在C++中,\n使用了,但我在Python中使用了什么?
我不想使用:
print (" ").这似乎不太优雅.
任何帮助将不胜感激!
#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
double a;
double b;
a =(3.0);
b =(5.0);
cout << " " << fixed << setprecision (1) << a << "\n" << endl;
cout << "* " << fixed << setprecision (1) << b << "\n" << endl;
cout << "------" << endl;
cout << fixed << setprecision (2) << a*b << "\n" << endl;
system("PAUSE");
return 0;
}
int calculate ()
{
double a;
double b;
double c; …Run Code Online (Sandbox Code Playgroud)