Advertisement
desislava_topuzakova

01.Honeycombs

Jun 10th, 2020
1,045
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _01.Honeycombs
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int countBees = int.Parse(Console.ReadLine());
  10.             int countFlowers = int.Parse(Console.ReadLine());
  11.  
  12.             double totalGramsHoney = 0.21 * countBees * countFlowers;
  13.             double countHoneyPie = Math.Floor(totalGramsHoney / 100);
  14.             double leftHoney = totalGramsHoney - countHoneyPie * 100;
  15.  
  16.             Console.WriteLine($"{countHoneyPie:F0} honeycombs filled.");
  17.             Console.WriteLine($"{leftHoney:F2} grams of honey left.");
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement