

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A set of questions related to c++ repetition structures, including 'for' and 'while' loops. Students are encouraged to explain false answers, provide enough work and explanation for pre-exam review, and ask for help during office hours or via email. Examples of c++ code and prompts for user input.
Typology: Exams
1 / 2
This page cannot be seen from the preview
Don't miss anything!
1 for ( int i (0); i <5; i ++ ) { 2 for ( int j ( i ); j >=1; j - - ) { 3 cout << ’? ’ ; 4 } 5 } 6 cout << endl ;
1 # include < iostream > 2 # include < cmath > 3 using namespace std ; 4 5 int main () 6 { 7 / / V a r i a b l e t o be r e a d f r o m u s e r 8 double x (0); 9 while ( true ) { 10 11 cout << " Enter a number for SQRT : " << 12 endl ; 13 cin >> x ; 14 15 cout << " The SQRT of " << x << " is " << 16 sqrt ( x ) << endl ; 17 18 } 19 20 return 0; 21 }