adplus-dvertising
frame-decoration

Question

Select the output for the following set of code:
static void Main(string[] args)
 {
     float s = 0.1f;
     while (s <= 0.5f)
     {
         ++s;
         Console.WriteLine(s);
     }
     Console.ReadLine();
 }

a.

0.1

b.

1.1

c.

0.1 0.2 0.3 0.4 0.5

d.

No output

Posted under C# programming

Answer: (b).1.1

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: