IvetValcheva

04. Vacation books list

Apr 4th, 2021
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.86 KB | None | 0 0
  1. using System;
  2.  
  3. namespace FirstStepsInCodding
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             //вход
  10.             //1.Брой страници в текущата книга – int - pagesOfBook
  11.             //2.Страници за 1 час – double -pagesPerHour
  12.             //3.Броя дни– int - days
  13.  
  14.             int pagesOfBook = int.Parse(Console.ReadLine());
  15.             double pagesPerHour = double.Parse(Console.ReadLine());
  16.             int days = int.Parse(Console.ReadLine());
  17.  
  18.             //timeForBook: pagesOfBook/pagesPerHour
  19.             //hoursPerDay: timeForBook/days
  20.             double timeForBook = pagesOfBook / pagesPerHour;
  21.             double hoursPerDay = timeForBook / days;
  22.  
  23.             //изход: hoursPerDay
  24.             Console.WriteLine(hoursPerDay);
  25.  
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment