Tuesday, July 6, 2010

while
for
do-while

syntactic sugar

conditionals

a == b
a != b
!( a == b)
a < b
a > b
a >= b
a <= b

||   OR
&&   AND

a = 5;
b = 2;
if (a == b || c == d)

c = 6;

if (a < c < b)
if (a < c && c < b)
{


infinite loop
int i = 0, j =0;

while (i < 10)
{
    cout << "Hello" << endl;
    j++;
}

sum of the numbers from 1 to 50


FOR LOOP

for (int i = 0; i < 10; i++)
{
    cout << "Hello!\n";
}

No comments:

Post a Comment