Today, We are going to learn the new thing with just doing some crazy things with the C-Sharp Loops and it contains the solution for the Hackerrank Day 5 30daysofcode Challenge Solution.So, Let's Begin with understanding the three words "What","Why" and "How". In the terms of 

  • What are the Loops?
  • Why we have to or we should have to use Loops ?
  • How we can implement the Loops ?

So, Firstly the Loops is something which we can say that it is a logical statements which are executed multiple time by providing some starting and the ending number of steps.

Let' say i want some functionality like whenever i send some number to the programmer it should have to give me the table of that number as example i want the table of the 3.

So, What are the steps i am going to do.

Take input from user,

//imports
//namespace
//class
//main methos

/*...Now the body parts goes here...*/

int n= Convert.toInt32(Console.ReadLine());


//close main
//close class
close namespace

Multiply it with 1 and print the out put then multiply with 2 and print output and so on till the multiply it with 10 and showing the output. Still Confusing let' s see the below code snippet.

/*...Inside the Body Part after getting the input from user...*/\

Console.WriteLine("{0} X 1 = ",n,(n*1));
Console.WriteLine("{0} X 2 = ",n,(n*2));
Console.WriteLine("{0} X 3 = ",n,(n*3));
Console.WriteLine("{0} X 4 = ",n,(n*4));
Console.WriteLine("{0} X 5 = ",n,(n*5));
Console.WriteLine("{0} X 6 = ",n,(n*6));
Console.WriteLine("{0} X 7 = ",n,(n*7));
Console.WriteLine("{0} X 8 = ",n,(n*8));
Console.WriteLine("{0} X 9 = ",n,(n*9));
Console.WriteLine("{0} X 10 = ",n,(n*10));

So, As you can see on the above code snippet we can get the whole table of the user inputed number. but here thing which is going wrong is the usage of the functionality we already have .

#csharp 

fully understand loops in C# for beginners
2.50 GEEK