#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;
a = (7.1);
b = (8.3);
c = (2.2);
cout << fixed << setprecision(1) << endl;
cout << " " << fixed << setprecision (1) << a << "\n" << endl;
cout << "* " << fixed << setprecision (1) << b << "\n" << endl;
cout << "- " << fixed << setprecision (1) << c << "\n" << endl;
cout << "------" << endl;
cout << std::setprecision(2) << (a * b) - c << "\n" << std::endl;
system("PAUSE");
return 0;
}
C++の入門書を読むように言ったり、あいまいな方法で私の問題を教えたりしないでください.1つ持っています. 悲しいことに、私はこれを1時間機能させるために取り組んできました笑。
出力:
1>------ ビルド開始: プロジェクト: 1.2、構成: Win32 のデバッグ ------ 1>LINK: エラー LNK2001: 未解決の外部シンボル _mainCRTStartup 1>c:\users\justin\desktop\1.2\Debug \1.2.exe : 致命的なエラー LNK1120: 1 つの未解決の外部情報 ========== ビルド: 0 成功、1 失敗、0 最新、0 スキップ ==========