18 lines
273 B
C++
18 lines
273 B
C++
#include <iostream>
|
|
using namespace std;
|
|
int main() {
|
|
int x = 0, y = 0, z = 0;
|
|
|
|
cout << "X: ";
|
|
cin >> x;
|
|
|
|
cout << "Y: ";
|
|
cin >> y;
|
|
|
|
cout << "Z: ";
|
|
cin >> z;
|
|
|
|
x = (x == 0 && (y >= 0 && z >= 0)) ? x = y+z: x = x;
|
|
cout << x;
|
|
return 0;
|
|
} |