Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ME 140 Worksheet Loops and Repetition 1) What are the results of the following loops? a) int x 5 while (x0) printf(% rn, x); x=x-1;

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
ME 140 Worksheet Loops and Repetition 1) What are the results of the following loops? a) int x 5 while (x0) printf("% rn", x); x=x-1; b) nti: fori -0:is 10:i++) printfi..%d", x*x); c) int g = 4; do f printfi-Countdown is at: %dn", g); 88-1: 3 while (gco d) int y 0 while (y) printf( "The number is now %d", y): c int c: for(c- 8: c0: c-) ific%2){ printfi Odd);: ME 140 Worksheet - Loops and Repetition 3 else Printf Even" 2) How many iterations will each of the following loops perform? a) for(i-0:i 10i++). b) int a 5; while( a> 0) c) for( x-2:x20:x+-2): [..] x20:x+-2): 1. d) printf"%d:'y); int y-8; dof 3 while (y>10): e) int 1-2, while (i

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Finance The Role Of Data Analytics In Manda Due Diligence

Authors: Ps Publishing

1st Edition

B0CR6SKTQG, 979-8873324675

More Books

Students also viewed these Databases questions