Skip to content

Instantly share code, notes, and snippets.

@YhorbyMatias
Created May 14, 2017 03:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YhorbyMatias/29312e0de6da1417e8677c67efdf63e7 to your computer and use it in GitHub Desktop.
Save YhorbyMatias/29312e0de6da1417e8677c67efdf63e7 to your computer and use it in GitHub Desktop.
Simulando venta restaurant
using System;
namespace Demo20
{
class MainClass
{
public static void Main(string[] args)
{
byte CAMB, CANH, CANP;
double APAGAR;
string linea;
const double PrecioB = 0.8;
const double PrecioH = 2;
const double PrecioP = 1.2;
Console.WriteLine("Cantidad Plato Aji de gallina");
linea = Console.ReadLine();
CANH = byte.Parse(linea);
Console.WriteLine("Cantidad de plato de arroz");
linea = Console.ReadLine();
CANP = byte.Parse(linea);
Console.WriteLine("Cantidad de refrescos");
linea = Console.ReadLine();
CAMB = byte.Parse(linea);
Console.WriteLine();
APAGAR = (CANH * PrecioH) + (CANP * PrecioP) + (CAMB * PrecioB);
Console.WriteLine("TOTAL A PAGAR \n" + APAGAR);
Console.ReadKey();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment