fork download
  1. // ideone.com/
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main () {
  6. int tmin, plan, pb=10000, pi=15000, pp=30000;
  7. double dcto, total, totalxc;
  8. cout << "Ingrese Su Tipo De Plan --> 1= Plan Basico, 2= Plan Ideal, 3= Plan Plus: ";
  9. cin >> plan;
  10. cout << "\n Minutos Consumidos En El Mes: ";
  11. cin >> tmin;
  12. //operaciones
  13. total=180*tmin;
  14. if (plan == 1)
  15. dcto=0;
  16. total+=pb;
  17. cout << "\n\n Plan Basico";
  18. if (plan==2)
  19. total+=pi;
  20. cout << "\n\n Plan Ideal";
  21. if (tmin>200)
  22. dcto=(180*tmin+pi-200)*1.05;
  23. if (plan==3)
  24. total+=pi;
  25. cout <<"\n\n Plan Plus";
  26. if (tmin>90)
  27. dcto=(180*tmin+pp-90)*1.05;
  28. total-=dcto;
  29.  
  30.  
  31.  
  32. //salida
  33. cout << "\n Cantidad De Minutos Consumidos: " << tmin;
  34. cout << "\n Total Por Consumo: $" << tmin*180;
  35. cout << "\n Total Descuento: $" << dcto;
  36. cout << "\n Neto A Pagar: $" << total;
  37.  
  38. }
Runtime error #stdin #stdout 0.78s 214656KB
stdin
Standard input is empty
stdout
Standard output is empty