Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <conio.h>
- #include <stdio.h>
- #include <stdlib.h>
- void main()
- {
- int ch=0,ant=0,opc=0;
- float s=0;
- printf("Ingrese la cantidad de horas:");
- scanf("%d",&ch);
- printf("\nIngrese la antiguedad:\n");
- scanf("%d",&ant);
- printf("Ingrese categoria: ");
- scanf("%d",&opc);
- switch (opc){
- case 1: s=((ch*10)+(ant*50));
- case 2: s=((ch*20)+(ant*50));
- case 3: s=((ch*25)+(ant*50));
- case 4: s=((ch*30)+(ant*50));
- }
- if(s>100){
- printf("El sueldo supera los 1000 pesos\n");
- system("pause");
- }
- else {
- printf("El sueldo es: %.2f\n",s);
- }
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement