Advertisement
EdibleCookie

C++ Test

Apr 17th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include iostream
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6.  
  7.     cout << "hello World" << endl;
  8.  
  9.     return 0;
  10.  
  11.     int age = 70;
  12. int ageAtLastExam = 16;
  13. bool isNotIntoxicated = true;
  14.  
  15. if((age >= 1 && (age < 16)){
  16.     cout << "you can't drive" << endl;
  17. }
  18.  
  19. else if(! isNotIntoxicated){
  20. cout << "you can't drive" << endl; }
  21.  
  22. else if (age >= 80 && ((age > 100 || (( age - ageAtLastExam) > 5))){
  23.  
  24.     cout << "you can't drive" << endl;
  25.  
  26. }
  27.  
  28. else {
  29.  
  30. cout << "you can drive" << endl;
  31.  
  32. }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement