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 _01.BasicSyntaxDemo
- {
- class Program
- {
- static void Main(string[] args)
- {
- var name = Console.ReadLine();
- double volume = int.Parse(Console.ReadLine());
- double energyBasic = int.Parse(Console.ReadLine());
- var sugarBasic = int.Parse(Console.ReadLine());
- double energy = energyBasic * ( volume / 100);
- double sugar = sugarBasic * ( volume / 100);
- Console.WriteLine("{0}ml {1}", volume, name);
- Console.WriteLine("{0}kcal, {1}g sugars", energy, sugar);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment