ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Código estacionamiento


Enviado por   •  29 de Agosto de 2017  •  Tareas  •  644 Palabras (3 Páginas)  •  106 Visitas

Página 1 de 3

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

namespace ejercicio_4

{

class Program

{

static void Main(string[] args)

{

Console.Title = "tarifa de un estacionamiento";

double h, p=0;

Console.WriteLine("DIGITE EL TIEMPO QUE SE ESTACIONÓ");

h = double.Parse(Console.ReadLine());

if (h <= 2)

{

p = 1.75*h;

}

else

{

if (h>2 && h<= 5)

{

p = 3.5 + ((h-2) * 1.25);

}

else

{

if (h>5 && h <= 10)

{

p = 7.25 + ((h-5) * 1);

}

else

{

if (10 < h)

{

p = 12.25 + ((h-10) * 0.75);

}

}

}

}

Console.WriteLine("EL USUARIO TARDO {0} Y PAGO ${1}", h, p);

Console.ReadKey();

}

}

}

...

Descargar como (para miembros actualizados)  txt (1.2 Kb)   pdf (41.3 Kb)   docx (10.7 Kb)  
Leer 2 páginas más »
Disponible sólo en Clubensayos.com