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 DiadpStavri
- {
- class Program
- {
- static void Main(string[] args)
- {
- double n = double.Parse(Console.ReadLine());
- double litri;
- double gradus;
- double gradusRakia = 0;
- double litriTotal = 0;
- double gradusRakiaTotal = 0;
- for (int i = 0; i < n; i++)
- {
- litri = 0;
- gradus = 0;
- litri = double.Parse(Console.ReadLine());
- gradus = double.Parse(Console.ReadLine());
- gradusRakia = litri * gradus;
- litriTotal += litri;
- gradusRakiaTotal += gradusRakia;
- }
- gradusRakiaTotal =(gradusRakiaTotal/litriTotal);
- Console.WriteLine("Liter: {0:f2}",litriTotal);
- Console.WriteLine("Degrees: {0:f2}",gradusRakiaTotal);
- if (gradusRakiaTotal < 38)
- {
- Console.WriteLine("Not good, you should baking!");
- }
- else if ((gradusRakiaTotal<=38)&&(gradusRakiaTotal<=42))
- {
- Console.WriteLine("Super!");
- }
- else if (gradusRakiaTotal>42)
- {
- Console.WriteLine("Dilution with distilled water!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment