Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //APS 01 EX 08
- //ALGORITMOS 02 PROF MALGARETE - CENTRO TECNOLOGICO UNIVERSIDADE POSITIVO
- //GILMAR JUNIOR DOS PASSOS
- #include "stdlib.h"
- #include "conio.h"
- #include "stdio.h"
- #include "string.h"
- #include "locale.h"
- #include "time.h"
- void main()
- {
- float salario[100], matricula[100], folha=0, media=0;
- int cont;
- for (cont=1;cont<=100;cont++)
- {
- salario[cont]=0;
- matricula[cont]=0;
- }
- cont=0;
- for (cont=1;cont<=100;cont++)
- {
- printf("Favor Informar a matricula do funcionario:\n");
- scanf ("%f",&matricula[cont]);
- printf("Favor Informar o salario do funcionario:\n");
- scanf ("%f",&salario[cont]);
- folha = folha + salario[cont];
- system("cls");
- }
- media = folha / cont;
- printf ("O total da folha de pagamento é:\n");
- printf ("%.2f R$",folha);
- printf ("A média salarial é de:\n ");
- printf ("%.2f R$",media);
- getch ();
- }
Advertisement
Add Comment
Please, Sign In to add comment