MATH-170 Midterm: MATH 170 Boise State Exam113Spring170x1a

24 views2 pages
15 Feb 2019
Department
Course
Professor

Document Summary

Cse -201 sample final exam spring 2014. This sample final examination contains ve problems, and should be completed within. Four variables are declared and initialized as shown below: int x = 5; int y = 6; char a = "a"; double b = 7. 545; Give a for-loop that will compute the sum 1+2+3++1000: int sum = 0; What will the following program segments output? (a) for (int i=1; i<4; i++) for (int j=i; j<3; j++) cout << j/i; (b) int m=5; int i=1; while (i != 10) if (i==m) cout << i; i++; Design a class snowman which consists of three circles - a small circle on top of a larger circle on top of the largest circle. The private data should consist of a point where the. Snowman is located (the center of the bottom circle) and an integer indicating the height of the.