Advertisement
Spocoman

Excursion

Jul 16th, 2022
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Excursion
  4. {
  5.     internal class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int people = int.Parse(Console.ReadLine());
  10.             int nights = int.Parse(Console.ReadLine());
  11.             int cards = int.Parse(Console.ReadLine());
  12.             int tickets = int.Parse(Console.ReadLine());
  13.            
  14.             double total = people * (nights * 20 + cards * 1.60 + tickets * 6) * 1.25;
  15.  
  16.             Console.WriteLine($"{total:f2}");
  17.         }
  18.     }
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement