Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #include <conio.h>
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main()
  6. {
  7. int ch=0,ant=0,opc=0;
  8. float s=0;
  9. printf("Ingrese la cantidad de horas:");
  10. scanf("%d",&ch);
  11. printf("\nIngrese la antiguedad:\n");
  12. scanf("%d",&ant);
  13. printf("Ingrese categoria: ");
  14. scanf("%d",&opc);
  15. switch (opc){
  16. case 1: s=((ch*10)+(ant*50));
  17. case 2: s=((ch*20)+(ant*50));
  18. case 3: s=((ch*25)+(ant*50));
  19. case 4: s=((ch*30)+(ant*50));
  20. }
  21. if(s>100){
  22. printf("El sueldo supera los 1000 pesos\n");
  23. system("pause");
  24. }
  25. else {
  26. printf("El sueldo es: %.2f\n",s);
  27. }
  28. system("PAUSE");
  29. return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement