adplus-dvertising
frame-decoration

Question

Select the output for the following set of Code:
static void Main(string[] args)
  {
      int n, r;
      n = Convert.ToInt32(Console.ReadLine());
      while (n > 0)
      {
          r = n % 10;
          n = n / 10;
          Console.WriteLine(+r);
      }
      Console.ReadLine();
  }
 for n = 5432.

a.

3245

b.

2354

c.

2345

d.

5423

Posted under C# programming

Answer: (c).2345

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Select the output for the following set of Code: