Notizen
Ohne Titel
Inhalt der Notizen (1)
Seite 1
Skip to content
Using 7th Secondary school "Nayden Gerov" Mail with screen readers
Enable desktop notifications for 7th Secondary school "Nayden Gerov" Mail. OK No thanks
Conversations
Program PoliciesPowered by
Last account activity: 1 hour ago
Details
namespace ConsoleApp1 { internal class Program { static void Main(string[] args) { //int day = int.Parse(Console.ReadLine()); //switch (day) //{ // case 1: // Console.WriteLine("Cardio training"); // break; // case 2: // Console.WriteLine("Weight lifting"); // break; // case 3: // Console.WriteLine("Yoga and Pilates"); // break; // case 4: // Console.WriteLine("Swimming"); // break; // case 5: // Console.WriteLine("Boxing"); // break; // case 6: // case 7: // Console.WriteLine("Rest day"); // break; // default: // //if (day == 6 || day == 7) // // Console.WriteLine("Rest day"); // //else // Console.WriteLine("Wrong day!"); // break; //} 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, 2)); } } } }
Program1.cs
Displaying Program1.cs.
Informationen
- Beschreibung
- Notiz am Ohne Titel, erstellt von Симеон Енгьозов am 27/04/2026.
- Erstellt von
- Симеон Енгьозов · Apr 2026
- Aktualisiert
- 27 Apr 2026
- Aufrufe
- 2
- Bewertung