// Calculo de Tarifa Telefonica SIN COMENTAR
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace TarifaTelefonica {
class Program{
static void Main (string [] args){
int cantKv;
double total, costoKv;
costoKv = 0;
string linea;
System.Console.WriteLine("Cantidad de kilovatios consumidos: ");
linea = Console.ReadLine();
cantKv = int.Parse(linea);
if(cantKv <= 1000){
costoKv = 0.14;
}
if(cantKv > 1000){
costoKv = 0.12;
}
if(cantKv > 1800){
costoKv = 0.8;
}
total = cantKv * costoKv;
System.Console.WriteLine("El total a pagar es: " + total);
}
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: