Advertisement
Guest User

Untitled

a guest
Apr 6th, 2020
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _2ndExc_6Task
  4. {
  5.     class Program
  6.     {
  7.         static void Main()
  8.         {
  9.             double meters = int.Parse(Console.ReadLine());
  10.             double price = meters * 7.61;
  11.             double price1 = price * 0.18;
  12.             double result = price - price1;
  13.             Console.WriteLine($"The final price is: {result:f2} lv.");
  14.             Console.WriteLine($"The discount is: {price1:f2} lv.");
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement