Thursday, October 30, 2014

Reflection Struct

I. Re-code again the example in the clip

Link C : Code Again


II. Implement data structure to store employer list

Link C:employer


III. Propose your own example use struct and array of struct


Link C:Example



Wednesday, October 29, 2014

Reflection String

1. Nhập vào một chuỗi ký tự


2. Copy một chuỗi sang chuỗi khác


3. Hiển thị các nguyên âm cách nhau dấu phẩy


4. Hiển thị các phụ âm cách nhau dấu cách


5. Đảo ngược chuỗi


6. Hiển thị từng từ trong chuỗi mỗi từ trên một dòng
7.Kết quả

File C:String




Monday, October 27, 2014

Reflection 12

1. Re-code again the example in the clip



File C: input from keyboard

2. Propose your own example using multi-dimension array

 Result

File C: Example


4.Summary
I have more knowledge about array. I know use multiarray. I know creat data of array by input from keyboard or creat data when creat variable.

Saturday, October 25, 2014

reflection 11


  1. void input(int *n, char a[]) - repeat input array of letter until entering a digit




2.void display(char a[], int n) - display


3. int find(char a[], char c, int n) - find c in a, return the index of c if found, otherwise return -1




4.void replace(char a[], char f, char c, int n) - replace f by c in a


5. void reverse(char a[], n) - reverse all element of a


6. int main() to show the result of above functions




7. Kết quả
File C:Find


Reflection 10


  1. void input(int *n, double a[]) - repeat input array of positive double until entering a double < 0

2.void display(double a[], int n) - display
3.void listmin(double a[], int n) - print the min and the index of min

4.void sort(double a[], int n) - sort array in descending order

5. int main() to show the result of above functions

6.Kết Quả


Link C :sort

Wednesday, October 22, 2014

Reflection 9

I. Re-code again the example in the clip




File C : demo
II. Implement functions
1. Nhập vào kích thước và các phần tử của một mảng một chiều
void nhap(int *n, int mang[])
2. Copy một mảng sang một mảng khác
void  copy(int nguon[], int dich[], int n)
3. tìm kiếm k trong mảng, không có trả về -1, có trả về chi so đầu tiên
int tim(int mang[], int n, int k)
4. In danh sách vị trí của các phần tử có giá trị bằng phần tử nhỏ nhất
void nhonhat(int mang[], int n)
5. Nhân đôi giá trị của các phần tử ở vị trí lẻ
void nhandoi(int mang[], int n)
6. Main
File C :Array Review





Monday, October 20, 2014

Reflection 8

I.Exercise
1.Re-code again the example in the clip.
File C:Demo
2.Implement functions to solve problems in reflection array
a.Input an positive integer n that indicated the number of element of array
Input n elements of array
b. Display array has just been inputted

c.Calculate sum of all elements
d.Sum of odd element
e. Average of even elements
f.Average of element at odd index
g. Main
File C;array
III. Propose your own example to pass array as a parameter in a function
Check number division 5
File C:example
IV. Reflection
I have more knowledge about array. Now, I can creat array as a parameter  in function . It is convenient when i code.  I will code shorter, faster and find  mistake when have problem.






Wednesday, October 15, 2014

Assignment 1

1 Cách làm
 Đầu Tiên , chúng ta sẽ tính giá trị Tiền gốc mỗi tháng phải trả , Sau đó , Tính tiền lãi mỗi tháng , Tiếp đến chúng ta  tính Tiền bảo hiềm bắt buộc .
Tiếp đến chúng ta sử dụng các câu lệnh " if else " để chia các trường hợp của Bảo hiểm tín dụng, Gia đình có Công , Lực Lượng Vũ trang, Khoản vay . Ngoài câu lênh "if else" chúng ta có thể dùng câu lệnh " switch" để kiểm tra các truuwongf hợp của Bảo Hiểm tính dụng, Gia đình có công, Lực lượng vũ trang.
2. Bài Làm

File C :assignment