Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int num;
- cin >> num;
- //if (((num >= 100) && (num <= 200) || num == 0 ))
- //{
- //}
- // else
- // {
- // cout << "Invalid";
- // }
- bool isValid = (num >= 100) && (num <= 200) || num == 0;
- if (!isValid) {
- cout << "Invalid" << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement