Ask your own question, for FREE!
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW) 22 Online
OpenStudy (anonymous):

hey everyone i was wondering what's wrong with my program? #include int main () { int a,b,c,d,e; printf("enter five integers:\n"); scanf("%d%d%i%i%i" ,&d,&e ,&a,&b,&c); if (a >b ,c ,d ,e) { printf("%i is the largest\n" ,a);} if (b>a ,c ,d ,e) { printf("%i is the largest\n" ,b);} if (c>a ,b ,d ,e){ printf("%i is the largest\n" ,c); } if (d>a ,b ,c ,e) { printf("%i is the largest\n" ,d);} if (e>a ,b ,c ,d){ printf("%i is the largest\n" ,e);} if (a

OpenStudy (anonymous):

if (c<a ,b ,d ,e) { printf("%i is the smallest\n" ,c); } if (d<a ,c ,b ,e) { printf("%i is the smallest\n" ,d);} if (e<c ,a ,b ,d) { printf("%i is the smallest\n" ,e); } return 0; }

OpenStudy (anonymous):

this was the rest of the q..

OpenStudy (anonymous):

Is this C++?

OpenStudy (anonymous):

oh its python well I don't know python XD

OpenStudy (rbx):

This ```python a >b ,c ,d ,e ``` isn't a valid boolean expression. You need to check if ``` a greater than b AND a greater than c AND a greater than d AND a greater than e ``` for which you need to type ``` a>b && a>c && a>d && a>e ```

OpenStudy (anonymous):

thank you so much RBX

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!