TOPIC

pq esta dando 20 error

Guilherme Henrique asked 7 months ago

include<bits/stdc++.h>

int main (){ double n1, n2, m; do{ scanf("%lf", &n1); if(n1<0 || n1>10); printf("nota invalida\n"); }while(n1<0 || n1>10); do{ scanf("%lf", &n2); if(n2<0 || n2>10); printf("nota invalida\n"); }while(n2<0 || n2>10);

m=(n1+n2)/2;
    printf("media = %.2lf\n",m);

return 0;

}

This topic has not been answered yet. Be the first!

Remember not post solutions. Your post may be reviewed by our moderators.