**************** Print Nx2 square table *****************
So my program is suppose to look like this...
Number Square
1 1
2 4
3 9
4 16
5 25
6 36
...
...
...
n n^2
The user enters a number and the table above is suppose to display, but it doesnt... Help!! Here's what I got...
#include<stdio.h>
int main()
{
int i, num, square;
printf("Enter a number: ");
scanf("%d", &num);
printf("Number\tSquare\n");
for (i=1; i<=num; i++);
{
square=i*i;
printf("%d%d\t", i, square);
}
}
Bookmarks