Operators and Expressions
Program which prints a sequence of squares of numbers. Note the use of the shorthand operator *=.
#include<stidio.h>
#define N 100
#define A 2
void main()
{
int a;
a = A;
while( a < N )
{
printf("%d\n", a);
a *= a;
}
getch();
}
No comments:
Post a Comment