fork(1) download
  1. #include <stdio.h>
  2. main()
  3. {
  4. int PV,SB,T;
  5. printf("Captura el número de prendas vendidas:");
  6. scanf("%d",&PV);
  7. printf("Captura el sueldo base:");
  8. scanf("%d",&SB);
  9. if (PV>=3 && PV<=8)
  10. {
  11. PV=PV*25;
  12. T=PV+SB;
  13. printf("Sueldo total: %d",T);
  14.  
  15. }
  16. else
  17. {
  18. if (PV>=9 && PV<=12)
  19. {
  20. PV=PV*45;
  21. T=PV+SB;
  22. printf("Sueldo total: %d",T);
  23.  
  24. }
  25. else
  26. {
  27. if (PV>=13 && PV<=18)
  28. {
  29. PV=PV*70;
  30. T=PV+SB;
  31. printf("Sueldo total: %d",T);
  32.  
  33. }
  34.  
  35. }
  36.  
  37.  
  38. }
  39.  
  40. return 0;
  41. }
  42.  
  43.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
Captura el número de prendas vendidas:Captura el sueldo base: