Exam1F09asolution

Exam1F09asolution - 0.2 hello 0.2 0.3 Problem 7 3 0.3 0 8 1...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
___________________________________ Name:_______________________________ n Circle One: (A1, A2, A3, A4, B1, B2, B3, B4) hello 3 Problem 3 2 6 3 5 Problem 4 -2 -1 0 1 -1 0 -1 0 1 Problem 7 8 4 2 5 Problem 8 2 5 0.556 4 Problem 9 9 25 20 4 Problem 10 1.600 8.000 6.400 16.000 0.2 0.3 0 wally[0] Problem 14 10 0 11 1 Problem 15 10 0 11 1 Problem 16 1 2 4 0 1 4 7 d. 5 0.2 0.3 1 Problem 19 0.0 10.0 20.0 5.0 Problem 20 -1.000 0.000 -2.000 2.000 EAS 230 Exam 1 Problems 1-5 October 21, 2009 Circle the correct output of the following program in the box to the right of the program statements using namespace std; #include<iostream> #include<iomanip> #include<cmath> int main() { int i; cout<<"Problem 1"<<endl; i = 6.932; cout << i << endl; cout<<"Problem 2"<<endl; int j=4; while(j<4) { j++; cout << "hello" << endl; } cout << j << endl; cout<<"Problem 3"<<endl; double price = 5; double up = 0.2; price += (price*up); cout << price << endl; cout<<"Problem 4"<<endl; int k=-2; while (k<0) { k++; cout << k << endl; } 1A
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

Exam1F09asolution - 0.2 hello 0.2 0.3 Problem 7 3 0.3 0 8 1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online