






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
THESE SLIDES ARE FOR BEGINNERS WHO ARE EAGER TO LEARN PROGAMMING LANGUAGES FROM SCRATCH...THESE SLIDES CONTAIN SOME BASIC INFO...
Typology: Slides
1 / 12
This page cannot be seen from the preview
Don't miss anything!







.
while(condition) { while(condition) { statement(s); } statement(s); // you can put more statements. }
do { statement(s); // you can put more statements. do { statement(s); } while( condition ); } while( condition );
7 *Nested loops (loop in loop) cin >> a >> b; for (int i = 0; i < a; i++) { for (int j=0; j<b; j++) { cout << “”; } cout << endl; }
b a
8 *Nested loops (2) int a,b; cin >> a >> b; for (int i = 0; i < a; i++) { for (int j=0; j<b; j++) { if (j > i) break; cout << “”; } cout << endl; }
**
b a
❑Due next Class ❑Send all your assignments to the CR and he will forward them to be prior to the class. ❑Only electronic versions will be accepted ❑Copied Assignments will be marked zero ❑Late Assignment not accepted ❑Don’t forget to write your name ❑Also, include a screenshot of the output (^10)
11 **Nested loops
Draw a flowchart, write the pseudo code and write a program that displays the following output