#include
void main ()
{
int i = 0; // This is initialising variables.
int n = 0;
int n2 = 0;
printf("n\t\tn^2\t\t\n______________________________\n"); // This creates the top line of the table, the "____" creates a line, the \t tabs across to create the headers making the heading look neater and more presentable.
for (i=0; i<=10; i=(i+1)) //setting conditions for loop
{
n2 = (i*i); // This is creating the second variable n2.
printf("%d\t\t%d\t\t\n", i, n2); // assigning variables n and n2 to rows.
}
system("pause"); // Pausing the program so I can view it in the execution window.
}
That should be it but correct me if im wrong.
Copyright © 2026 eLLeNow.com All Rights Reserved.