hello,...i want to make program to square the numbers from 1 to 20. i have written this program, it's running but not giving the required answer.i think it is giving a garbage value...please tell me where is the issue....I'm very basic programmer studying C++...hope you'll response soon
Code:
void main(void) {int a; int b; b=a*a; for (a=1; a<21; a++) {printf("%d",b); printf("the square is%d=b"); } getche();}
Comment