Код: Выделить всё
S=cos(M_PI/2);
printf("\nx=%lf; cos(x)=%lf", M_PI/2, S);
cout << endl;
cout << setprecision(1) << "cos=" << S;
Тип переменной S dauble.
Модераторы: Hawk, Romeo, Absurd, DeeJayC, WinMain
Код: Выделить всё
S=cos(M_PI/2);
printf("\nx=%lf; cos(x)=%lf", M_PI/2, S);
cout << endl;
cout << setprecision(1) << "cos=" << S;