{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

W15-Struct_Func2

# W15-Struct_Func2 - Functions 2 1 Program Design Top-down...

This preview shows pages 1–3. Sign up to view the full content.

10/24/05 1 Functions 2 10/24/05 2 Program Design Top-down design (or step-wise refinement) Start with total problem and break into sub- problems, then into sub-sub-problems, etc. Make functions for each sub-problem. main() solves whole by calling f1(), f2(), f3(). f1() solves sub-problem by calling f4(), f5(), etc. 10/24/05 3 C Program Structure main fcn1 fcn2 fcn3 fcn4 fcn5 fcn6 calls calls calls

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
10/24/05 4 Extended In-Class Example Simple Animation Algorithm 1) Draw a figure on the screen at (x, y). 2) Pause a bit. 3) Erase the figure. 4) Change x and/or y a small amount. 5) Check for screen boundries. 6) Repeat from step 1) 10/24/05 5 conio.h Library _gotoxy(int x, int y) – positions console screen cursor at column x, row y. _textcolor(int color) – sets the text foreground color for future screen writes.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern