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 Practice
- {
- class Program
- {
- static void Main(string[] args)
- {
- double fats = int.Parse(Console.ReadLine());
- double proteins = int.Parse(Console.ReadLine());
- double carbs = int.Parse(Console.ReadLine());
- double calories = int.Parse(Console.ReadLine());
- double water = int.Parse(Console.ReadLine());
- double fatsGR = ((fats/100)*2500)/ 9;
- double proteinGR = ((proteins / 100) * 2500) / 4;
- double carbGR = ((carbs / 100) * 2500) / 4;
- double weight = fatsGR + proteinGR + carbGR;
- double weightPerGr = 2500 / weight;
- double oneGR = weightPerGr * (1 - water / 100);
- Console.WriteLine($"{oneGR:F4}");
- }
- }
- }
Add Comment
Please, Sign In to add comment