Algoritmos

Páginas: 2 (360 palabras) Publicado: 12 de diciembre de 2012
1
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args){
int hombres = 0, mujeres = 0, total, Nest;
char sexo;
Console.Write("numero de estudiantes:");
Nest = Convert.ToInt32(Console.ReadLine());{
for (int i = 1; i <= Nest; i++) ;
Console.Write("cual es su sexo:");
sexo = Convert.ToChar(Console.ReadLine());
}{
if (sexo == 'h')
{
hombres = hombres + 1;
}
else
{
mujeres =+1;
}
}
total = mujeres + hombres;
Console.WriteLine("total de hombres:"+hombres);
Console.WriteLine("total demujeres:"+mujeres);
Console.WriteLine(" el total es:"+total);
Console.ReadLine();

}
}
}

2
using System;
using System.Collections.Generic;
usingSystem.Linq;
using System.Text;

namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
double cantidad, precio, importe,subtotal, impuesto, total;
const double igv = 0.18;
char respuesta;
subtotal = 0;
do
{
Console.Write("ingrese lacantidad:");
cantidad = Convert.ToDouble(Console.ReadLine());
Console.Write("precio:");
precio = Convert.ToDouble(Console.ReadLine());importe = cantidad * precio;
subtotal = subtotal + importe;
Console.WriteLine("desea hacer otra venta");
respuesta=Convert.ToChar(Console.ReadLine());...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Algoritmo
  • Algoritmo
  • Algoritmos
  • Algoritmos
  • Algoritmos
  • Algoritmos
  • Algoritmos
  • Algoritmos

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS