How do you generate a 10x10 multiplication table in C# using for statements?
wmeckes10
2007-10-22 17:43:21 UTC
A console application that accepts an input as an integer (n). Then displays a 10x10 multiplication table beginning from n using for or while statements.
Three answers:
2007-10-22 18:19:49 UTC
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
Console.Write("Please enter an integer to generate a" + "multiplication table for: ");
int num = int.Parse(Console.ReadLine());
for (int i = 0; i < 10; i++)
{
for (int j = 0; j < 10; j++)
{
Console.Write((num + i) * (num + j) + "\t");
}
Console.Write("\n");
}
}
}
}
laxminarain
2016-12-17 17:12:46 UTC
Multiplication Chart To 12x12
sami a
2016-04-27 10:26:29 UTC
Very easy read u r school book
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.