how to print the sum of the three numbers on a single line?using c program.
Answer (1)
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!
Comments (0)
Related Questions
sum of three odd numbers = 30 HOW??
40230 Views




