Answer to Question #312720 in C# for kun

Question #312720

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)


1
Expert's answer
2022-03-16T14:48:36-0400
    public static void Main(string[] args) {
        for (int i = 1; i <= 100; i++) {
            Console.Write((i * i) + " ");
        }
    }

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS