(Solved) : Void Tennis Int Float X X 10 70 0 Q42717387 . . .

void Tennis() { int i; float x; x = 1.0/7.0; for (i=0;i<20; i++) { x = x + 1.0/7.0 if (x == 2.0) std::cout << x << Matchn

void Tennis() { int i; float x; x = 1.0/7.0; for (i=0;i<20; i++) { x = x + 1.0/7.0 if (x == 2.0) std::cout << x << ” Matchn”; (a) The author of the above function expected it to print Match once. It compiled with no errors. However, when run, it printed nothing at all. Explain why. (b) Write down a better version of the same if test that would work as intended. Note: If you need a function but can’t remember the exact name for it, it is acceptable to invent your own name and add a note explaining what the function does. Show transcribed image text void Tennis() { int i; float x; x = 1.0/7.0; for (i=0;i

Expert Answer


Answer to void Tennis() { int i; float x; x = 1.0/7.0; for (i=0;i…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?