Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Lutenitza
- {
- class Program
- {
- static void Main(string[] args)
- {
- double tomatoesQuantityInKg = double.Parse(Console.ReadLine());
- int boxesNum = int.Parse(Console.ReadLine());
- int jarsNum = int.Parse(Console.ReadLine());
- double lutenitsaKg = tomatoesQuantityInKg / 5;
- double jars = lutenitsaKg / 0.535;
- double boxes = jars / jarsNum;
- Console.WriteLine("Total lutenica: " + Math.Floor(lutenitsaKg) + "kilograms.");
- if (boxes > boxesNum)
- {
- Console.WriteLine(Math.Floor(boxes - boxesNum) + " boxes left.");
- Console.WriteLine(Math.Floor(jars - (boxesNum * jarsNum)) + " jars left.");
- }
- else
- {
- Console.WriteLine(Math.Floor(boxesNum - boxes) + " more boxes needed.");
- Console.WriteLine(Math.Floor((boxesNum - boxes) * jarsNum) + " more jars needed.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement