Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _09._SpiceMustFlow
- {
- class Program
- {
- static void Main(string[] args)
- {
- int startingYield = int.Parse(Console.ReadLine());
- int days = 0;
- int totalYield = 0;
- if (startingYield > 100)
- {
- while (startingYield >= 100)
- {
- days++;
- totalYield += startingYield;
- totalYield -= 26;
- startingYield -= 10;
- }
- totalYield -= 26;
- }
- Console.WriteLine(days);
- Console.WriteLine(totalYield);
- }
- }
- }
Add Comment
Please, Sign In to add comment