[ create a new paste ] login | about

Link: http://codepad.org/sACP5gD8    [ raw code | output | fork | 2 comments ]

Rituparnadatta - C, pasted on Sep 15:
1
2
3
4
5
6
7
8
9
10
11
12
13
//prints a sequence of squares of numbers and use operator *=//
#define N 100
#define A 2
main()
{
int a;
a=A;
while( a<N)
{
printf("%d \n",a);
a*=a;
}
}


Output:
1
2
3
4
5
2 
4 
16 

Exited: ExitFailure 4


Create a new paste based on this one


Comments:
posted by Rituparnadatta on Sep 15
shorthand operator *=
reply
posted by Rituparnadatta on Sep 15
constant valu defiend
reply