Advertisement
silvana1303

honeycombs

May 22nd, 2020
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1. using System;
  2.  
  3. namespace exampreparation
  4. {
  5.     class exam
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int bees = int.Parse(Console.ReadLine());
  10.             int flowers = int.Parse(Console.ReadLine());
  11.  
  12.             double beesProduct = bees * flowers * 0.21;
  13.  
  14.             double honeycombs = beesProduct / 100;
  15.  
  16.             double rest = beesProduct % 100;
  17.  
  18.             Console.WriteLine($"{Math.Floor(honeycombs)} honeycombs filled.");
  19.             Console.WriteLine($"{rest:f2} grams of honey left.");
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement