Thursday, October 23, 2014

Bài tập lớn

Đề tài: Thiết kế trang web của ngân hàng thế giới http://www.worldbank.org/

Ngân hàng thế giới (World Bank) là một tổ chức tài chính quốc tế nơi cung cấp những khoản vay nhằm thúc đẩy kinh tế cho các nước đang phát triển thông qua các chương trình vay vốn. Trang web của WB có rất nhiều tin tức về mọi mặt của xã hội trên toàn thế giới.

Friday, October 3, 2014

Day 7: Struct

1.  Write a C Program to store student data in a structure. The data should include student ID, name, course registered for, and year of joining. Write a function to display the details of students enrolled in a specified academic year. Write another function to locate and display the details of a student based on a specified student ID.


Thursday, September 25, 2014

Day 6 - 3: Pass by references

1. Viết hàm truyền vào 2 số nguyên bất kỳ, thực hiện đổi chỗ 2 số đó
Nguyên mẫu hàm như sau:
void swap (int &number1, int &number2);

2. Viết hàm truyền vào một mảng số nguyên bất kỳ, sau đó đảo ngược mảng số nguyên đó
void reverse(int array[]);

3. Viết hàm truyền vào một mảng ký tự, và một ký tự bất kỳ, kiểm tra xem ký tự bất kỳ đó có nằm trong mảng không. Nếu có trả về số lần xuất hiện của ký tự đó, nếu không trả về -1

int countCharacter(char array[], char ch);

Day 6 - 2: Pass by value

1. Write a function which accepts an integer value as input, and returns an integer which is the cube of that input

Tuesday, September 23, 2014

Test 24/09


Day 6 - 1: Exercise function

1. Write a C program that accepts a number and square the number with the help of a function.
To do this,
a. Declare a function.
b. Accept the number.
c. Pass the number to the function and return the square of that number
Function prototype: int cal_square(int number);

Sunday, September 21, 2014

Day 5 - 2: Character array

1. Write a program which prints the letters in a char array in reverse order. For
example, if the array contains {'c', 's', 'c', '2', '6', '1'}the output (to the terminal)
should be "162csc"

Day 5 - 1: Number array

1. Write a program that asks the user to type 10 integers of an array. The program must compute and write how many integers are greater than or equal to 10.


Tuesday, September 16, 2014

Day 4 - 3: Using do..while loop do some exercise

1. Declare a variable which has the age of the person. Print the user’s name as many times as his age

Day 4 - 2: Using for loop do some exercise

1. Declare a variable which has the age of the person. Print the user’s name as many times as his age

Monday, September 15, 2014

Day 4 - 1: Using while loop do some exercises

1. Declare a variable which has the age of the person. Print the user’s name as many times as his age

Sunday, September 14, 2014

Day 3 - 5: More conditional

1.  Declare two variables x and y. Assign values to these variables. Number x should be printed only if it is less than 2000 or greater than 3000, and number y should be printed only if it is between 100 and 500.

Day 3 - 4: More if

1.  Write a program that accepts two numbers a and b and checks whether or not a is divisible by b.

Day 3 - 3: Exercise about if

2. https://www.khanacademy.org/computing/cs/programming/logic-if-statements/p/challenge-flashy-flash-card


Day 3 - 2: Exercise with ball

https://www.khanacademy.org/computing/cs/programming/logic-if-statements/p/challenge-bouncy-ballBài tập này yêu cầu chúng ta viết câu lệnh if để làm cho bóng chạy lên xuống.
*Cú pháp lệnh if:
if (điều kiện){Các lệnh;}

Day 3 - 1: Exercise gets()/puts()

1.   Write a program to accept and add three numbers.

Thursday, September 11, 2014

Day 2 - Delivery 3: Using printf() and scanf()

1. Use the printf() statement and do the following:
Print out the value of the integer variable sum
Print out the text string "Welcome", followed by a new line.
Print out the character variable letter
Print out the float variable discount
Print out the float variable dump using two decimal places



Day 1 - Delivery 2: How to work

FLIPPED LEARNING

1. How do you learn each objective of this course? (mark of 2)

Cách học ở đây sẽ là chúng ta tự tìm kiếm những thông tin về bài học, tìm hiểu những khái niệm mới, kiến thức mới, sau đó áp dụng để làm các bài tập có liên quan tại nhà. Nếu có vướng mắc gì chúng ta sẽ trao đổi với các bạn ở trên lớp.


2. What is advantage and difficulty when you apply this methodology? (mark of 3)
Sau khi áp dụng phương pháp học này, theo mình nó có một số ưu điểm và khó khăn sau:

Day 2 - Delivery 1: Exercise for variable

1. Challenge: Bucktooth Bunny


Step1:

Tuesday, September 9, 2014

Day 2 - Delivery 2: Exerceise for datatype

Using dev-C++ do some exercises


1. Write a program display your information, for instance:
Full-Name, Age, Address

Day 1 - Delivery 3: Exercise for drawing

1. Write a pseudo code and draw a flowchart to accept a value in degrees Celsius and to convert it into Fahrenheit. [Hint: C/5 = (F-32)/9].

Begin
Input C
F = 9/5*C + 32
Output F
End

2. Write a pseudo code and flowchart to accept a student’s marks in Physics, Chemistry, and Biology. The total of these marks as well as the average should be displayed.

Begin
Input: P,C,B
TB = (P+C+B)/3
Output TB
End

Monday, September 8, 2014

Day 1 - Delivery 1: Ready laptop

Sau đây mình sẽ hướng dẫn các bạn download và cài đặt 3 phần mềm sau:
- Dev C++ (dùng để học C và C++)
- Dia (vẽ lưu đồ)
- Xmind (xây dựng bản đồ tư duy)

1. Dev C++ 5.7.1
Bước 1: Vào trang web http://dev-c1.software.informer.com/download/.