Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Petar_sGame
- {
- static void Main()
- {
- double numberPages = double.Parse(Console.ReadLine());
- int campingDays = int.Parse(Console.ReadLine());
- int pagesPerDay = int.Parse(Console.ReadLine());
- int readingDays = 30 - campingDays; //dni chete
- int MonthPages = readingDays * pagesPerDay; //kolko stranici za 1 mesec
- if (readingDays == 0)
- {
- Console.WriteLine("never");
- }
- else
- {
- int totalReading = (int)Math.Ceiling(numberPages / MonthPages);
- int years = totalReading / 12;
- int months = totalReading % 12;
- Console.WriteLine("{0} years {1} months", years, months);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement