Currently my issue is that when entering my values and value b is greater than a, my code will not execute valueb > valuea. But when A is greater than B, the if statement action will execute. I'm honestly stuck.
#include <cstdio>
#include <cmath>
int main()
{
float valuea = 0;
float valueb = 0;
float valuec = 0;
enter code here
printf("Enter your first value: ");
scanf("%f", &valuea);
printf("Enter your second value: ");
scanf("%f", &valueb);
printf("Enter your third value: ");
scanf("%f", &valuec);
if (valuea > valueb)
printf("%f > %f", valuea, valueb);
else
{
valueb > valuea;
printf("%f > %f", valueb valuea);
}
return 0;
}
Aucun commentaire:
Enregistrer un commentaire