19.forloop
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace forloopexample
{
class Program
{
static void Main(string[] args)
{
int no;
Console.Write("Enter Number:");
no = Convert.ToInt16(Console.ReadLine());
for (int i = 1; i <= 10; i++)
{
Console.WriteLine("{0} X {1}={2}", no, i, no * i);
}
Console.Read();
}
}
}
OUTPUT:
Enter any number = 11
11 X 1 = 11
11 X 2 = 22
11 X 3 = 33
11 X 4 = 44
11 X 5 = 55
11 X 6 = 66
11 X 7 = 77
11 X 8 = 88
11 X 9 = 99
11 X 10 = 110
Comments
Post a Comment