0
The program is skipping the variables without even putting the number I want to use on it. All I can do is put the first one in and then it jumps and it goes to zero.
I don’t know if it’s program error Dev-C++ or the code.
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
void main()
{
float basemaior, basemenor, altura, resultado;
printf ("entre com a base maior do trapezio: ");
scanf ("f%", &basemaior);
printf ("entre com a base menor do trapezio: ");
scanf ("f%", &basemenor);
printf ("entre com a altura do trapezio: ");
resultado=(basemaior+basemenor)*altura / 2;
printf ("\no calculo da area de um trapezio e: f%", resultado);
system ("PAUSE");
}
I suggest you turn on your compiler warnings.
– pmg