Advertisement
Alexandr0v

Untitled

Feb 2nd, 2024
25
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | Source Code | 0 0
  1. string nameOfActor = Console.ReadLine();
  2. double academyPoints = double.Parse(Console.ReadLine());
  3. int n = int.Parse(Console.ReadLine());
  4.  
  5. for (int i = 1; i <= n; i++)
  6. {
  7. string jury = Console.ReadLine();
  8. double juryPoints = double.Parse(Console.ReadLine());
  9.  
  10. academyPoints = academyPoints + ((jury.Length * juryPoints) / 2);
  11.  
  12. if (academyPoints >= 1250.5)
  13. {
  14. Console.WriteLine($"Congratulations, {nameOfActor} got a nominee for leading role with {academyPoints:f1}!");
  15. break;
  16. }
  17.  
  18. }
  19.  
  20. if (academyPoints < 1250.5)
  21. {
  22. Console.WriteLine($"Sorry, {nameOfActor} you need {1250.5 - academyPoints:f1} more!");
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement