fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. float consumoGeneral = 0;
  7. float consumo = 0;
  8.  
  9. cout << "\t\tEficiencia Energetica" << endl;
  10. cout << endl << endl;
  11. cout << "Para determinar la eficiencia energetica \ningrese el Consumo "
  12. "General (en kW): ";
  13. cin >> consumoGeneral;
  14. cout << endl;
  15. cout << "Ahora ingrese el consumo a comparar: ";
  16. cin >> consumo;
  17. cout << endl;
  18.  
  19. if ((consumo >= 0.8 * consumoGeneral) && (consumo <= consumoGeneral)) {
  20. cout << "CONSUMO MEDIO";
  21. } else if (consumo < 0.8 * consumoGeneral) {
  22. cout << "CONSUMO BAJO" << endl;
  23. } else {
  24. cout << "ALTO CONSUMO DE ENERGIA";
  25. }
  26.  
  27. cin.get();
  28. return 0;
  29. }
Success #stdin #stdout 0s 16064KB
stdin
100
80
stdout
		Eficiencia Energetica


Para determinar la eficiencia energetica 
ingrese el Consumo General (en kW): 
Ahora ingrese el consumo a comparar: 
CONSUMO MEDIO