how to print the sum of the three numbers on a single line?using c program.
Hye there,
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
int sum = 0;
int x, y, z;
cin >> x >> y >> z;
sum = x + y + z;
cout << sum << endl;
return 0;
}
Hope it helps!