填入缺失的部分,以列印兩個數字的和(由使用者輸入)
int x, y; int sum; cout << "輸入一個數字: "; @(3) >> @(1); cout << "輸入另一個數字: "; @(3) >> @(1); sum = x + y; cout << "和是: " << @(3);
int x, y; int sum; cout << "輸入一個數字: "; cin >> x; cout << "輸入另一個數字: "; cin >> y; sum = x + y; cout << "和是: " << sum;