---
# System prepended metadata

title: Problem

---

# Problem

## 7/17 

### 7/17 - 1
Write a program that prints out your profile

**Goal** : 
```clike
$./profile
Name : Gilbert
Age : 20
Email : smpss96243@gmail.com
Department : CCEP
```

### 7/17 - 2
Write a program that can sum / divide / mutiple / substract 2 numbers .

**Goal** :
```clike
$./sum
Enter fisrt number : 1
Enter second number : 2

Sum of two number : 3
```


## 7/21

### 7/21 - 1
Write a simple calculator that can do `+` , `-` , `*`  and `/` .These four operation should be select by user .

Goal :
```
$ ./cal
Select a mode : +
fisrt number : 1
second number : 2
result : 3
```

### 7/21 - 2
Write a simple game that the user has to guess the number , and the number is generate by program .
```
$ ./guess
8
failed
```
```
$ ./guess
10
success
```
產生隨機變數 : rand()
```clike
#include <stdlib.h>
number = rand()%range + 1 ;
```

## 7/23

### 7/23 - 1
Write a program that can find out the maxima and minimum of 3 numbers .

```
$ ./maxmin
Enter the first number :　5
Enter the second number :　8
Enter the third number :　9
9 is the max
5 is the min
```

### 7/23 - 2
Write a program to show if a number is odd (奇數) and if it is tell us if it can be divide by 3 .

```
$ ./tellodd
Enter the number : 6
it isn't odd number
```

```
$./tellodd
Enter the number : 9
It is odd number , and can be divide by 3 .

```

## 8/5

### 8/5 -1
Write a program to print out a pyramid
```clike 
$./pyramid
  *
 ***
*****
```

### 8/5 -1.5
Like the problem above , let user to choose the height .
```clike 
$./pyramid
Enter the height : 5
    *
   ***
  *****
 *******
*********
```

### 8/5 - 2
Like 7/21 -1 , write a calculator that can keep using untill user quit .
```
$./calculator
Select a mode : +
fisrt number : 1
second number : 2
result : 3

Select a mode : -
fisrt number : 1
second number : 2
result : -1

Select a mode : q
Bye !
```

## 8/12

### 8/12 -1 
Write a 終極密碼 online game , you should tell the player if the answer is bigger or smaller . 
```
$ ./game.exe
Welcome to final password !
Enter your range : 100
====== Round 1 ======
Enter your guessing : 54
The answer is smaller than 54 !
====== Round 2 ======
Enter your guessing : 12
The answer is bigger than 12 !
====== Round 3 ======
Enter your guessing : 35
The answer is bigger than 35 !
====== Round 4 ======
Enter your guessing : 42
Correct ! You are brilliant > < !

```
