forked from aaronrr/Cpp-to-Python-Converter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cc
More file actions
44 lines (37 loc) · 693 Bytes
/
test.cc
File metadata and controls
44 lines (37 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Aaron Robeson C++ code
#include <iostream>
#include <string>
using namespace std;
int main()
{
// this is a useless variable
int y;
int z = 5;
while (true)
{
if (z > 10 || true == false)
{
break;
}
z++;
cout << "z is " << z << endl;
}
cout << "z is " << z << endl;
cout<<"Please enter your name: ";
string name = "";
cin>>name;
cout << "Hello " << name << ", this is a test" << endl;
cout<<"another cout test" << endl;
int x = 60;
// This is a comment
while (x > 0)
{
x = x - 3;
if (x % 2 == 0)
{
cout << "x is even::";
}
cout << "x is now equal to: " << x << endl;
}
cout << x << endl;
}