SHARE
TWEET

oscars

mumuzet Jul 22nd, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace oscars
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args) // NOT DONE! 75/100!!!!
  8.         {
  9.             string actorName = Console.ReadLine();
  10.             double initalPoints = double.Parse(Console.ReadLine());
  11.             int juryMembersNumber = int.Parse(Console.ReadLine());
  12.             double totalAdditionalPoints = 0;
  13.             double totalPoints = 0;
  14.             bool isNominated = false;
  15.  
  16.             for (int i = 0; i < juryMembersNumber; i++)
  17.             {
  18.                 string juryMemberName = Console.ReadLine();
  19.                 double evaluation = double.Parse(Console.ReadLine());
  20.                 int nameLengt = juryMemberName.Length;
  21.                 double additionalPoints = nameLengt * evaluation / 2;
  22.                 totalAdditionalPoints += additionalPoints;
  23.  
  24.                 if (totalAdditionalPoints + initalPoints >= 1250.5)
  25.                 {
  26.                     isNominated = true;
  27.                     break;
  28.                 }
  29.             }
  30.             if (isNominated)
  31.             {
  32.                 Console.WriteLine($"Congratulations, {actorName} got a nominee for leading role with {totalAdditionalPoints + initalPoints:f1}!");
  33.             }
  34.             else
  35.             {
  36.                 Console.WriteLine($"Sorry, {actorName} you need {1250.5 - totalAdditionalPoints - initalPoints} more!");
  37.             }
  38.         }
  39.     }
  40. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top