Lab 8

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

1|Page

Lab 8

OBJECTIVE
Write program to find the table of a number

Console.WriteLine("Write the number u want the table of")

int number = int.Parse(Console.ReadLine());

Console.WriteLine("write final multiplier");

int multi = int.Parse(Console.ReadLine());

Console.WriteLine();

int start = 1;

while (start<= multi)

int results = number * start;

start++;

Console.WriteLine(results);

Console.WriteLine();

Console.WriteLine();

Console.WriteLine("Write the number u want the table of");

int Number = int.Parse(Console.ReadLine());

Console.WriteLine("write final multiplier");

int Multi = int.Parse(Console.ReadLine());

Console.WriteLine();
2|Page

int Start = 1;

do

int results = Number * Start;

Start++;

Console.WriteLine(results);

while (Start <= Multi) ;

Console.WriteLine("write even or odd number you want to start from");

int first = int.Parse(Console.ReadLine());

Console.WriteLine("write final digit");

int last = int.Parse(Console.ReadLine());

int factor=0 ;

Console.WriteLine();

while ( factor<= last )

factor = first + 2;

Console.WriteLine(factor);

factor++;

first++;
3|Page

You might also like