Valantina

FoodDelivery/Exam

Jun 13th, 2019
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. namespace FoodDelivery
  2. {
  3.     using System;
  4.  
  5.     class FoodDelivery
  6.     {
  7.         static void Main()
  8.         {
  9.             int countChikens = int.Parse(Console.ReadLine());
  10.             int countFishes = int.Parse(Console.ReadLine());
  11.             int countVegiterian = int.Parse(Console.ReadLine());
  12.             double priceWithoutDesert = countChikens * 10.35 + countFishes * 12.40 + countVegiterian * 8.15;
  13.             double desertPrice = priceWithoutDesert * 0.20;
  14.            
  15.             Console.WriteLine($"Total: {(priceWithoutDesert +desertPrice + 2.50):F2}");
  16.         }
  17.     }
  18. }
Add Comment
Please, Sign In to add comment