单选题

运行下列程序,输出结果是(    )。

#include <iostream>

#include <iomanip>

using namespace std;

int main() {

   float x=1/5.0;

   cout << x <<" ";

   cout <<setiosflags(ios::fixed);

   cout <<setprecision(1)<< x << " ";

   cout <<setprecision(3)<< x << "\n";

   return 0;

}

A

0.2 0 0.2

B

0.2 0.2 0.2

C

0 0.2 0.200

D

0.2 0.2 0.200

赣ICP备20007335号-2