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 test_1
- {
- class Program
- {
- static void Main(string[] args)
- {
- string Name = Console.ReadLine();
- int Volume = int.Parse(Console.ReadLine());
- int Energy = int.Parse(Console.ReadLine());
- int Sugar = int.Parse(Console.ReadLine());
- double TotalEnergy = (Volume / 100.0) * Energy;
- double TotalSugar = (Volume / 100.0) * Sugar;
- Console.WriteLine($"{Volume}ml {Name}:");
- Console.WriteLine($"{TotalEnergy}kcal, {TotalSugar}g sugars");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement