計算(a+b)×c的值
【題目描述】
給定3個整數a、b、c,計算表達式(a+b)×c的值。
【輸入】
輸入僅一行,包括三個整數a、b、c, 數與數之間以一個空格分開。(-10,000<a,b,c<10,000)
【輸出】
輸出一行,即表達式的值。
【輸入樣例】
2 3 5
【輸出樣例】
25
具體代碼
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
cout<<(a+b)*c;
return 0;
}
來源:《信息學奧數(C++版)》第五版