Notes
Untitled
Content of the notes (1)
Page 1
int vehicle = int.Parse(Console.ReadLine());
double hours = double.Parse(Console.ReadLine());
if (hours <= 0) { Console.WriteLine("Error!"); } else
{ double price = 0;
double finalPrice = 0
; switch (vehicle)
{ case 1: price = 2
; break
; case 2:
price = 5
; break;
default:
Console.WriteLine("Not valid!")
; break;
} finalPrice = price * hours;
if (hours > 10) { finalPrice = finalPrice * 0.8; } Console.WriteLine(Math.Round(finalPrice
Information
- Description
- Note on Untitled, created by Симеон Енгьозов on 27/04/2026.
- Created by
- Симеон Енгьозов · Apr 2026
- Updated
- Apr 27, 2026
- Views
- 1
- Rating