Topic link
Title description
Read in three numbers a, b, c and output the value of a * (b + c-a)
Input
three numbers a, b, c, separated by spaces
Output
output operation result
Sample Input
1 2 4
Sample Output
5
Ideas
Read in three numbers a, b, c and output the value of a * (b + c-a)
C++ code:
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
cout << a * (b + c - a) << endl;
return 0;
}