我已經在C++一個簡單的程序,這是代碼:如何讓用戶鍵入一個值而不是存儲常量值?
#include <iostream>
using namespace std;
int main()
{
int number;
int square;
number = 5;
square = number * number;
cout << "The square is ";
cout << square;
return 0;
}
它做什麼基本上是取整數「5」,畫面上出現的平方值等等...
我的問題是:
我該如何讓程序從用戶處取任何值而不是將值存儲在內存中?
比Q
你應該繼續閱讀你的書。 – Rapptz