Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _17.BookProblem
- {
- class BookProblem
- {
- static void Main()
- {
- double bookPages = double.Parse(Console.ReadLine());
- double campigDays = double.Parse(Console.ReadLine());
- double pagesPerDay = double.Parse(Console.ReadLine());
- campigDays = 30 - campigDays;
- if (campigDays <= 0)
- {
- Console.WriteLine("Never");
- }
- else
- {
- Console.WriteLine("{0} years {1} months", Math.Floor((bookPages / (campigDays * pagesPerDay)) / 12), Math.Ceiling(bookPages / (campigDays * pagesPerDay)) % 12);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement