Question
a. while (k < 10) { cout < < k < < ; k++; } b. int k = 1 ; while (k != 10)
a. while (k < 10) { cout << k<< ; k++; }
b. int k = 1 ; while (k != 10) { cout << k<< ; k+=2 ; }
c. int k = 1 ; while (k < 10) { cout << k<< ; k - - ; }
d. int k = 1 ; while (k < 10) ; { cout << k++<< ; k - ; }
e. int k = 0 ; while (k < 5 ) cout << k<< ; k++ ;
f. int k = 1 ; while (k < 4) cout << k - - << ; k++ ; }
g. for ( int j = 0, j < 10, j++) { cout << j << endl ; }
h. for ( int j = 0; j < 5; j++) ; { cout << j << endl ; }
i. for ( int j = 0; j < 7 ; j++) { cout << j << endl ; }cout << j << endl;
j. for ( int j = 0 , k = 1 0; j < 5 ,k > 0 ; j++,k-- ) { cout << j << << endl ; }
k. for ( int j = 0; j = 5; j++) { cout << j << endl ; }
l. for ( int j = 0; j++; j<5) { cout << j << endl; }
m. int h = 1; do cout << h << endl; h++; while (h < 4);
n. int h = 1; do { cout << h << endl; h++; } while (h < 5)
o. int h = 1; do { cout << h << endl; } while (h < 4);
p. int h = 1; do { cout << h << endl; h++; } while (h > 5)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started