Write a program to display the squares of all the numbers 1 to 100 in a table format similar to the output displayed. You have to make use of a loop. (Note: the output shown here is only an extract of the output your program should give)
public static void Main(string[] args) {
for (int i = 1; i <= 100; i++) {
Console.Write((i * i) + " ");
}
}
Comments
Leave a comment