Advertisement
Spocoman

09. Yard Greening

Aug 21st, 2024
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. using System;
  2.  
  3. namespace YardGreening
  4.  
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             double squareMeters = double.Parse(Console.ReadLine());
  11.  
  12.             double price = squareMeters * 7.61;
  13.             double discount = price * 0.18;
  14.             double finalPrice = price - discount;
  15.  
  16.             Console.WriteLine($"The final price is: {finalPrice} lv.");
  17.             Console.WriteLine($"The discount is: {discount} lv.");
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement