The program I did compiled, but what is requested does not appear on the screen. The question is this:
Construct an algorithm in PORTUGOL, which receives three values, A, B, and C, and store them in three variables with the following names: MAJOR, INTER and MINOR (the names correspond to the ordered values).
#include <stdio.h>
#include <stdlib.h>
main()
{
float a,b,c,maior,menor,inter;
printf("\n Digite o primeiro valor:");
scanf("%f",&a);
printf("\n Digite o segundo valor:");
scanf("%f",&b);
printf("\n Digite o terceiro valor:");
scanf("%f",&c);
if((a<b)&&(a<c))
{
menor=a;
}
if(b<c)
{
inter=b;
maior=c;
}
else
{
inter=c;
maior=b;
}
if((b<a)&&(b<c))
{
menor=b;
}
if(a<c)
{
inter=a;
maior=c;
}
else
{
inter=c;
maior=a;
}
if((c<a)&&(c<b))
{
menor=c;
}
if(a<b)
{
inter=a;
maior=b;
}
else
{
inter=b;
maior=a;
}
system("pause");
return 0;
}