Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace CatDiet
- {
- class Program
- {
- public static void Main()
- {
- int fats = int.Parse(Console.ReadLine());
- int proteins = int.Parse(Console.ReadLine());
- int carbohydrates = int.Parse(Console.ReadLine());
- double calories = int.Parse(Console.ReadLine());
- int water = int.Parse(Console.ReadLine());
- double caloriesPerGram = (100 - water) * (calories / (calories * fats / 9
- + calories * proteins / 4 + calories * carbohydrates / 4));
- Console.WriteLine($"{caloriesPerGram:f4}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement