Search........

Google

Friday, March 7, 2008

Looping Statements

Let us consider acondition where we have to get a 100 numbers.These codes can sill be length like
inum1=Convert.ToInt32(Console.ReadLine());
inum2=Convert.ToInt32(Console.ReadLine());
inum3=Convert.ToInt32(Console.ReadLine());
inum4=Convert.ToInt32(Console.ReadLine());
inum5=Convert.ToInt32(Console.ReadLine());
inum6=Convert.ToInt32(Console.ReadLine());
.
.
.
.
inum100=Convert.ToInt32(Console.ReadLine());
so to over come these problem we are using the loop sattements....Here we will use a loop statement the body will be executed until the condition turns false

No comments: