Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace oscars
- {
- class Program
- {
- static void Main(string[] args) // NOT DONE! 75/100!!!!
- {
- string actorName = Console.ReadLine();
- double initalPoints = double.Parse(Console.ReadLine());
- int juryMembersNumber = int.Parse(Console.ReadLine());
- double totalAdditionalPoints = 0;
- double totalPoints = 0;
- bool isNominated = false;
- for (int i = 0; i < juryMembersNumber; i++)
- {
- string juryMemberName = Console.ReadLine();
- double evaluation = double.Parse(Console.ReadLine());
- int nameLengt = juryMemberName.Length;
- double additionalPoints = nameLengt * evaluation / 2;
- totalAdditionalPoints += additionalPoints;
- if (totalAdditionalPoints + initalPoints >= 1250.5)
- {
- isNominated = true;
- break;
- }
- }
- if (isNominated)
- {
- Console.WriteLine($"Congratulations, {actorName} got a nominee for leading role with {totalAdditionalPoints + initalPoints:f1}!");
- }
- else
- {
- Console.WriteLine($"Sorry, {actorName} you need {1250.5 - totalAdditionalPoints - initalPoints} more!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement