Bob103

C#_Kat(5)

Mar 12th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.81 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace ConsoleApplication3
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             const int price_chocolate = 49;//цена за шоколад
  11.             const int price_coffee = 20;//цена за кофе
  12.             const int price_milk = 70;//цена за молоко
  13.             Console.Write("Enter number Chocolate:");
  14.             int choc = int.Parse(Console.ReadLine());
  15.             Console.Write("Enter number Coffee:");
  16.             int cof = int.Parse(Console.ReadLine());
  17.             Console.Write("Enter number Milk:");
  18.             int mil = int.Parse(Console.ReadLine());
  19.             Console.WriteLine("Total amount = {0}",
  20.             choc * price_chocolate + cof * price_coffee + mil * price_milk);
  21.  
  22.         }
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment