inital commit, adding all school projects
This commit is contained in:
18
ternaereOperatoren/main.cpp
Normal file
18
ternaereOperatoren/main.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user