GJPassos

APS 01 EX 08 ALGORITMOS 02

May 16th, 2013
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.86 KB | None | 0 0
  1. //APS 01 EX 08
  2. //ALGORITMOS 02 PROF MALGARETE - CENTRO TECNOLOGICO UNIVERSIDADE POSITIVO
  3. //GILMAR JUNIOR DOS PASSOS
  4. #include "stdlib.h"
  5.  #include "conio.h"
  6.  #include "stdio.h"
  7.  #include "string.h"
  8.  #include "locale.h"
  9.  #include "time.h"
  10.  void main()
  11. {
  12.     float salario[100], matricula[100], folha=0, media=0;
  13.     int cont;
  14.  
  15.     for (cont=1;cont<=100;cont++)
  16.     {
  17.         salario[cont]=0;
  18.         matricula[cont]=0;
  19.     }
  20.     cont=0;
  21.     for (cont=1;cont<=100;cont++)
  22.     {
  23.         printf("Favor Informar a matricula do funcionario:\n");
  24.         scanf ("%f",&matricula[cont]);
  25.         printf("Favor Informar o salario do funcionario:\n");
  26.         scanf ("%f",&salario[cont]);
  27.         folha = folha + salario[cont];
  28.         system("cls");
  29.     }
  30.     media = folha / cont;
  31.     printf ("O total da folha de pagamento é:\n");
  32.     printf ("%.2f R$",folha);
  33.     printf ("A média salarial é de:\n ");
  34.     printf ("%.2f R$",media);
  35.     getch ();
  36.  }
Advertisement
Add Comment
Please, Sign In to add comment