Advertisement
ignacy123

prawo_jazdy

Oct 7th, 2024
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. /******************************************************************************
  2.  
  3. Online C++ Compiler.
  4. Code, Compile, Run and Debug C++ program online.
  5. Write your code in this editor and press "Run" button to compile and execute it.
  6.  
  7. *******************************************************************************/
  8.  
  9.  
  10.  
  11.  
  12.  
  13. using namespace std;
  14.  
  15. #include <iostream>
  16.  
  17. int main()
  18. {
  19. int age;
  20. int years_before_driving;
  21. int driver_licence_age;
  22.  
  23. cout << "wprowadź minimalny wiek do uzyskania prawa jazdy w twoim kraju";
  24.  
  25. cin >> driver_licence_age;
  26.  
  27. cout << "Ile masz lat?";
  28.  
  29. cin >> age;
  30.  
  31. years_before_driving = driver_licence_age - age;
  32.  
  33. if (age >= driver_licence_age)
  34. cout << "Możesz otrzymać prawo jazdy";
  35. if (age < driver_licence_age)
  36. cout << "nie możesz jeszcze jeździć przez " << years_before_driving << " lat";
  37.  
  38. return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement