Text book:
page 152 Practice 5,6
page 176 problem 1,2,7,8,9
page 177 problem 14,15,16
You should submit your answer through the Google form which is sent to you by Email.
Due: next Monday Class time 02/25/13 10:10
Monday, February 18, 2013
Wednesday, February 13, 2013
Project 4
Page 178 Problem 25 <-- You are required to use a while-loop to solve this problem
Page 179 Problem 29 <-- You are required to use a for-loop to solve this problem
Since you have 2 problems this time, you will need to upload two cpp files and two executable files for the corresponding problems.
Due: 2/20/13 Wednesday midnight
Page 179 Problem 29 <-- You are required to use a for-loop to solve this problem
Since you have 2 problems this time, you will need to upload two cpp files and two executable files for the corresponding problems.
Due: 2/20/13 Wednesday midnight
Friday, February 8, 2013
Written Homework 3
Text book:
page 135 problem 1,2,3,4,5,7
page 136 problem 8,9,10,14
You should submit your answer through the Google form which is sent to you by Email.
Due: next Friday Class time 02/15/13 10:10
Problem 14:
page 135 problem 1,2,3,4,5,7
page 136 problem 8,9,10,14
You should submit your answer through the Google form which is sent to you by Email.
Due: next Friday Class time 02/15/13 10:10
Problem 14:
int a = 750;
if( a > 0 )
if(a >= 1000)
a=0;
else
a*=2;
else
a*=10;
Wednesday, February 6, 2013
Project 3: Age problem
Create an program that allows the user to input an age in years and then displays one of the following (or similar) responses. You program should be able to figure out how many years to display in some of the responses :
| Age Range | Response | |
| 0 < age <6 | You are considered a young minor. But, in approximately ___ year(s) you will be able to attend school! | |
| 6<= age<16 | In approximately ___ year(s) you will be able to drive! | |
| 16<=age<21 | In approximately ___ year(s) you will be of legal drinking age. | |
| 21<=age<35 | You are of legal drinking age. In approximately ___ year(s) you will be able to run for president! | |
| 35<=age<120 | You are old enough to run for U.S. President. | |
| age >= 120 | You are too enough to run for U.S. President. |
Tip: the most suitable type of age is "int"
"if-elseif-else" would be perfect for this program
Due: 2/13/13 midnight
Friday, February 1, 2013
Written Homework2
Text book
page 89. problem 1, 2, 5, 6, 7
page 90. problem 8,12,13,14,15
Due: next Friday 2/8/13 10:10 class time
page 89. problem 1, 2, 5, 6, 7
page 90. problem 8,12,13,14,15
Due: next Friday 2/8/13 10:10 class time
Wednesday, January 30, 2013
Project 2: Degree Conversion Assignment
Textbook page 91, problem 26
Here are some instructions.
1. You don't have to define any class in this project. We just need basic arithmetic programming.
2. You could use hard-coded degrees in your program. In other words, you don't have to ask user to input anything with "cin". ( However, if you could, it would be better but no extra credit.)
3. You do have to use "cout" to show your results on the screen.
4. Take care of the "integer division" issue.
Due time would next Wednesday 2/6/13 midnight.
Here are some instructions.
1. You don't have to define any class in this project. We just need basic arithmetic programming.
2. You could use hard-coded degrees in your program. In other words, you don't have to ask user to input anything with "cin". ( However, if you could, it would be better but no extra credit.)
3. You do have to use "cout" to show your results on the screen.
4. Take care of the "integer division" issue.
Due time would next Wednesday 2/6/13 midnight.
Wednesday, January 23, 2013
Project1: Hello World
Hello world on your machine.
Upload both the cpp file and executable.
Windows:
Follow the instruction I uploaded to install the MinGW.
Linux:
In your terminal, type
sudo apt-get install build-essential
MacOS:
Install Xcode where you could download from
https://developer.apple.com/downloads/index.action
Fill in the survey forms to get access to developer zone.
Then search the corresponding version based on your system.
Mountain Lion or Lion Xcode 4.5.2
Snow leopard Xcode 3.2.2 developer tools
Leopard Xcode 2.5
Then in the terminal, do what I did on class.
Subscribe to:
Posts (Atom)









