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 _02.Pets
- {
- class Program
- {
- static void Main(string[] args)
- {
- var days = int.Parse(Console.ReadLine());
- var KgFood = int.Parse(Console.ReadLine());
- var DogFood = double.Parse(Console.ReadLine());
- var CatFood = double.Parse(Console.ReadLine());
- var TurtleFood = double.Parse(Console.ReadLine())/1000;
- var TotalKGFood = (DogFood + CatFood + TurtleFood) * days;
- if (TotalKGFood>KgFood)
- {
- TotalKGFood -= KgFood;
- Console.Write("{0} kilos of food left",Math.Floor(TotalKGFood));
- }
- else
- {
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement