Está en la página 1de 2

EJERCICIO # 1

internal class Ejercicio1Tarea


{
private static void Main(string[] args)
{
//Definir e Inicializar Variables...
string ACProducto1 = "Hamburguesas", ACProducto2 = "Pasta", ACProducto3 =
"Papas", ACProducto4 = "Refresco";
int Cantidad1 = 0, Cantidad2 = 0, Cantidad3 = 0, Cantidad4 = 0;
//Definir Constantes e Inizializarlas...
const double Precio1 = 150, Precio2 = 100, Precio3 = 50, Precio4 = 30, ISV
= 0.13;
double Subtotal = 0;
var TotalISV = 0.0;
var Total = 0.0;
double TotalExento = 0.0;
//Lectura de Variables...
Console.WriteLine("Sistema de Facturacion");
Console.WriteLine("Ingrese la Cantidad de {0} con Precio {1}", ACProducto1,
Precio1);
Cantidad1 = Convert.ToUInt16(Console.ReadLine());
Console.WriteLine("Ingrese la Cantidad de {0} con Precio {1}", ACProducto2,
Precio2);
Cantidad2 = int.Parse(Console.ReadLine());
Console.WriteLine("Ingrese la Cantidad de {0} con Precio {1}", ACProducto3,
Precio3);
Cantidad3 = int.Parse(Console.ReadLine());
Console.WriteLine("Ingrese la Cantidad de {0} con Precio {1}", ACProducto4,
Precio4);
Cantidad4 = int.Parse(Console.ReadLine());

//Calsulos del sistema...


Subtotal = ((Cantidad1 * Precio1) + (Cantidad2 * Precio2) + (Cantidad3 *
Precio3) + (Cantidad4 * Precio4));
TotalISV = (Subtotal * ISV);
TotalExento = (Precio4 * Cantidad4);
Total = Subtotal + TotalISV + (Precio4 * Cantidad4);

Console.WriteLine("Sub Total de Factura {0}", Subtotal);


Console.WriteLine("Total ISV de Factura {0}", TotalISV);
Console.WriteLine("Total de Exento de la Factura {0}", TotalExento);
Console.WriteLine("------------------------");
Console.WriteLine("Total de Factura {0}", Total);

EJERCICIO # 2

internal class Ejercicio2Tarea


{
private static void Main(string[] args)
{
//Definir e Inicializar Variables...
string ACNombre1 = "Alumno # 1", ACNombre2 = "Alumno # 2", ACNombre3 =
"Alumno # 3", ACNombre4 = "Alumno # 4", ACNombre5 = "Alumno # 5", ACNombre6 =
"Alumno # 6", ACNombre7 = "Alumno # 7", ACNombre8 = "Alumno # 8", ACNombre9 =
"Alumno # 9", ACNombre10 = "Alumno # 10";
int Nota1 = 0, Nota2 = 0, Nota3 = 0, Nota4 = 0, Nota5 = 0, Nota6 = 0, Nota7
= 0, Nota8 = 0, Nota8 = 0, Nota9 = 0, Nota10 = 0;
int NumC1 = 0, NumC2 = 0, NumC3 = 0, NumC4 = 0, NumC5 = 0, NumC6 = 0, NumC7
= 0, NumC8 = 0, NumC8 = 0, NumC9 = 0, NumC10 = 0,
//Definir Constantes e Inizializarlas...
var Promedio = 0.0;

//Lectura de Variables...
Console.WriteLine("Sistema de Facturacion");
Console.WriteLine("Ingrese el Nombre del Alumno # 1 de {0}", ACNombre1);
Nota1 = Convert.ToUInt16(Console.ReadLine());

Console.WriteLine("Ingrese la Cantidad de {0} con Precio {1}", ACProducto2,


Precio2);
Cantidad2 = int.Parse(Console.ReadLine());
Console.WriteLine("Ingrese la Cantidad de {0} con Precio {1}", ACProducto3,
Precio3);
Cantidad3 = int.Parse(Console.ReadLine());
Console.WriteLine("Ingrese la Cantidad de {0} con Precio {1}", ACProducto4,
Precio4);
Cantidad4 = int.Parse(Console.ReadLine());

//Calsulos del sistema...

Console.WriteLine("Sub Total de Factura {0}", Subtotal);


Console.WriteLine("Total ISV de Factura {0}", TotalISV);
Console.WriteLine("Total de Exento de la Factura {0}", TotalExento);
Console.WriteLine("------------------------");
Console.WriteLine("Total de Factura {0}", Total);

También podría gustarte