hello sir can you please tell me why it is not correct??? #include main() { int X; double a,b,s=0,av; while(1) { scanf("%lf%lf",&a,&b); if(a>=0&&b>=0&&a<=10&&b<=10) { s=a+b; av=s/2.0; printf("media = %.2lf\n",av); printf("novo calculo (1-sim 2-nao)\n"); scanf("%d",&X); if(X==2) break; else continue;
hello sir can you please tell me why it is not correct???
ReplyDelete#include
main()
{
int X;
double a,b,s=0,av;
while(1)
{
scanf("%lf%lf",&a,&b);
if(a>=0&&b>=0&&a<=10&&b<=10)
{
s=a+b;
av=s/2.0;
printf("media = %.2lf\n",av);
printf("novo calculo (1-sim 2-nao)\n");
scanf("%d",&X);
if(X==2)
break;
else
continue;
}
else
printf("nota invalida\n");
}
return 0;
}