-
Notifications
You must be signed in to change notification settings - Fork 0
/
Beecrowd1038.cs
52 lines (47 loc) · 1.75 KB
/
Beecrowd1038.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using System.Globalization;
//by @Foqsz
namespace Course
{
class Program
{
static void Main(string[] args)
{
/*Console.WriteLine("----------------------------");
Console.WriteLine("CODIGO | ESPECIFICACAO | PRECO");
Console.WriteLine("----------------------------");
Console.WriteLine("1 - Cachorro Quente - R$4.50");
Console.WriteLine("2 - X Salada - R$4.50");
Console.WriteLine("3 - X Bacon - R$5.00");
Console.WriteLine("4 - Torrada Simples - R$2.00");
Console.WriteLine("5 - Refrigerante - R$1.50");
Console.WriteLine("----------------------------");
Console.Write("Qual o seu pedido? (Digite: ID Do Pedido e Quantidade): ");*/
string[] pedidos = Console.ReadLine().Split(' ');
int idPedido = int.Parse(pedidos[0]);
int quantidade = int.Parse(pedidos[1]);
double total;
if (idPedido == 1)
{
total = quantidade * 4.0;
}
else if (idPedido == 2)
{
total = quantidade * 4.5;
}
else if (idPedido == 3)
{
total = quantidade * 5.0;
}
else if (idPedido == 4)
{
total = quantidade * 2.0;
}
else
{
total = quantidade * 1.5;
}
Console.WriteLine($"Total: R$ " + total.ToString("F2", CultureInfo.InvariantCulture));
}
}
}