-
Notifications
You must be signed in to change notification settings - Fork 0
/
Beecrowd1010.cs
29 lines (23 loc) · 998 Bytes
/
Beecrowd1010.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
using System;
using System.Globalization;
namespace Course
{
internal class Program
{
static void Main(string[] args)
{
string[] entradas = Console.ReadLine().Split(' ');
int codigo = int.Parse(entradas[0]);
int pecas = int.Parse(entradas[1]);
double valor = double.Parse(entradas[2], CultureInfo.InvariantCulture);
string[] entradasDois = Console.ReadLine().Split(' ');
int codigoDois = int.Parse(entradasDois[0]);
int pecasDois = int.Parse(entradasDois[1]);
double valorDois = double.Parse(entradasDois[2], CultureInfo.InvariantCulture);
double sum = (pecas * valor);
double sum2 = (pecasDois * valorDois);
double result = sum + sum2;
Console.WriteLine("VALOR A PAGAR: R$ " + result.ToString("F2", CultureInfo.InvariantCulture));
}
}
}