What will be the output of the following C# code? [code] static void Main(string[] args) { float i = 1.0f, j = 0.05f; do {

Phương Quyên

New member
What will be the output of the following C# code?
Code:
static void Main(string[] args)
{
    float i = 1.0f, j = 0.05f;
    do
    {
        Console.WriteLine(i++ - ++j);
    }while (i < 2.0f &#038;&#038; j <= 2.0f);
    Console.ReadLine();
}
A. 0.05
B. -0.05
C. 0.95
D.
Code:
 -0.04999995
 

Tìm kiếm

Back
Top