diff options
author | Oskar <[email protected]> | 2024-08-20 13:51:53 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-08-20 13:51:53 +0200 |
commit | 12dda8d5244e86096a5ea56014073dd1892cc409 (patch) | |
tree | ffaf835edd33da23a58405db5e733ebfc71e5a5e /conditional-operator-tests.cpp | |
parent | d0c6ac2b68380020d76d7f938307e056a25eb5f5 (diff) |
more
Diffstat (limited to 'conditional-operator-tests.cpp')
-rw-r--r-- | conditional-operator-tests.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/conditional-operator-tests.cpp b/conditional-operator-tests.cpp new file mode 100644 index 0000000..570b4ec --- /dev/null +++ b/conditional-operator-tests.cpp @@ -0,0 +1,22 @@ +#include <iostream> + +/* + * + * + * + * + */ + +int main () { + + unsigned int grade = 0; + if(std::cin >> grade) { + if(grade > 100) { return -1; } + + } else { + return -1; + } + + std::cout << (grade < 60 ? "fail" : "pass") << std::endl; + return 0; +} |