Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace SuppliesForSchool
- {
- class Program
- {
- static void Main()
- {
- double penPrice = 5.80;
- double markerPrice = 7.20;
- double detergentPrice = 1.20;
- int penCount = int.Parse(Console.ReadLine());
- int markerCount = int.Parse(Console.ReadLine());
- int detergentCount = int.Parse(Console.ReadLine());
- double discount = int.Parse(Console.ReadLine());
- double totalPrice = (1 - discount / 100) * (penCount * penPrice + markerCount * markerPrice + detergentCount * detergentPrice);
- Console.WriteLine(totalPrice);
- }
- }
- }
- Леко тарикатската:
- using System;
- namespace SuppliesForSchool
- {
- class Program
- {
- static void Main()
- {
- double penPrice = int.Parse(Console.ReadLine()) * 5.80;
- double markerPrice = int.Parse(Console.ReadLine()) * 7.20;
- double detergentPrice = int.Parse(Console.ReadLine()) * 1.20;
- double discount = int.Parse(Console.ReadLine());
- Console.WriteLine((1 - discount / 100) * (penPrice + markerPrice + detergentPrice));
- }
- }
- }
- Лоша практика:
- using System;
- namespace SuppliesForSchool
- {
- class Program
- {
- static void Main()
- {
- Console.WriteLine((int.Parse(Console.ReadLine()) * 5.8 + int.Parse(Console.ReadLine()) * 7.2 + int.Parse(Console.ReadLine()) * 1.2) * (1 - double.Parse(Console.ReadLine()) / 100));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement