Advertisement
stupid_pro

Untitled

Nov 11th, 2021
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. using System;
  2. class HelloWorld
  3. {
  4. public static void Main(string[] args)
  5. {
  6.  
  7. int age = Convert.ToInt32(Console.ReadLine());
  8. bool drive = false;
  9. //или - ||
  10. //и - &&
  11. if (age >= 18 && drive)
  12. {
  13. Console.WriteLine("Я могу водить машину");
  14. }
  15. else
  16. {
  17. Console.WriteLine("Мне нет 18-и");
  18. }
  19. }
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement