Find the value of y according to condition: Condition
I tried to do but something is wrong or I did not right so I need some help
#include <stdio.h>
int x,y;
int main()
{
scanf("%d",&x);
if (x<5) y=x*x-3*x+4;
else y= x+7;
printf("%d",y);
return 0;
}
Aucun commentaire:
Enregistrer un commentaire