Advertisement
Guest User

Untitled

a guest
Oct 10th, 2015
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. int people;
  2. int cats;
  3. int dogs;
  4.  
  5. Console.Write("Enter number of people:");
  6. people = int.Parse(Console.ReadLine());
  7.  
  8. Console.Write("Enter number of cats:");
  9. cats = int.Parse(Console.ReadLine());
  10.  
  11. Console.Write("Enter number of dogs:");
  12. dogs = int.Parse(Console.ReadLine());
  13.  
  14. if (people < cats)
  15. Console.WriteLine("Too many cats! The world is doomed!");
  16.  
  17. else if (people > cats)
  18. Console.WriteLine("Not many cats! The world is saved!");
  19.  
  20. else if (people < dogs)
  21. Console.WriteLine("The world is drooled on!");
  22.  
  23. else if (people > dogs)
  24. Console.WriteLine("The world is dry!");
  25.  
  26. dogs = (dogs + 5);
  27.  
  28. if (people >= dogs)
  29. Console.WriteLine("People are greater than or equal to dogs");
  30.  
  31. else if (people <= dogs)
  32. Console.WriteLine("People are less than or equal to dogs");
  33.  
  34. else if (people == dogs)
  35. Console.WriteLine("People are equal to dogs");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement