You need to set up a C++ compiler in your computer. I recommend Microsoft Vistual C++ Express. It is free. Another option is using Cygwin G++ compiler, which is also free.

In this week, you will make three simple programs.

1. Write a program that asks the user for the lengths of the sides of a rectangle. Then print

The area and perimeter of the rectangle
 
The length of the diagonal (use the Pythagorean theorem)
 

2. Write a program that prompts the user for the names and salaries of three employees. Then print out the average salaries of the employees. Information about each employee must be stored in an employee object.

3. Write a program that reads a number greater than or equal to 1,000 from the user and prints it out with a comma separating the thousands. Here is a sample dialog; the user input is in color:

    Please enter an integer >= 1000:  23456    23,456

내용은 대략 요거,,,

내 풀이는,,,, 이거참조(였는데,,, due가 길어져서 검열당한,,,)

'대학생활 > C++' 카테고리의 다른 글

내맘대로 강좌 C++편 5  (2) 2009.03.19
내맘대로 강좌 C++편 4  (2) 2009.03.18
내맘대로 강좌 C++편 3  (4) 2009.03.17
내맘대로 강좌 C++편 2  (1) 2009.03.17
내맘대로 강좌 C++편 1  (0) 2009.03.16