Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //APS 01 EX 02
- //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"
- void main()
- {
- setlocale(LC_ALL, "Portuguese");
- float base1=0, base2=0, altura=0, area=0;
- printf ("Qual o valor da base menor do trapézio:\n");
- scanf ("%f",&base1);
- printf ("Qual o valor da base maior do trapézio:\n");
- scanf ("%f",&base2);
- printf ("Qual o valor da altura do trapézio:\n");
- scanf ("%f",&altura);
- area = ((base1+base2)*altura) / 2;
- printf ("A área do trapézio é:\n");
- printf ("%.2f",area);
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment