Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2020
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7. int num;
  8. cin >> num;
  9.  
  10. //if (((num >= 100) && (num <= 200) || num == 0 ))
  11. //{
  12. //}
  13. // else
  14. // {
  15. // cout << "Invalid";
  16. // }
  17.  
  18. bool isValid = (num >= 100) && (num <= 200) || num == 0;
  19. if (!isValid) {
  20. cout << "Invalid" << endl;
  21. }
  22.  
  23.  
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement