Advertisement
silvana1303

spice must flow

May 25th, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4.  
  5.  
  6. namespace exampreparation
  7. {
  8.     class exam
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             int startYield = int.Parse(Console.ReadLine());
  13.             int days = 0;
  14.             int storage = 0;
  15.  
  16.             while (startYield > 100)
  17.             {
  18.                 days++;
  19.                 storage +=  startYield - 26;
  20.                 startYield -= 10;
  21.             }
  22.  
  23.             storage -= 26;
  24.             Console.WriteLine(days);
  25.             Console.WriteLine(storage);
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement