Khoá học lập trình C/C++ Dành cho người mới bắt đầu Quản lý motobike - Quản lý xe cộ - Lập trình C
- 5.0/5.0
- 2k Đăng ký
- Học lập trình
- Tiếng việt
Thông tin khóa học
1. Data
Declare a structure:
struct motorbike_st {
char name[20];
char manufacturer[10];
char madein[12];
long int price;
};
In the main() function, declare an array of 3 motorbikes named motorbikeList.
2. Menu-Based Program
Create a menu-driven program with the following options:
-
Input motorbike data
-
Sort, display detailed information, and show statistics of all motorbikes
-
Find motorbikes by manufacturer
-
Save to text file
motorbike.txt -
Exit
3. Input Motorbike Data
When the user chooses option 1, perform the following:
Example:
Enter data of motorbike 1:
Name: Air Blade
Manufacturer: Honda
Made In: Viet Nam
Price: 40000000
This module must be implemented in a separate function that:
-
Has a
motorbike_ststruct array as an argument. -
Stores the input data into the
motorbikeListarray in themain()function.
4. Sort, Display Information, and Statistics
When the user chooses option 2:
-
Sort motorbikes in descending order by manufacturer.
-
Display detailed information of each motorbike in the following format:
No || Name || Manufacturer || Made In || Price ||
001 || Sirius || Yamaha || Viet Nam || 28000000 ||
002 || Air Blade || Honda || Viet Nam || 40000000 ||
003 || Dyland || Honda || Thai Lan || 150000000 ||
Display the number of motorbikes by manufacturer, for example:
Yamaha has 1 motorbike
Honda has 2 motorbikes
This module must be implemented in a separate function that:
-
Has a
motorbike_ststruct array as an argument.
5. Find Motorbike by Manufacturer
When the user chooses option 3:
-
Display:
Enter manufacturer for search: -
Find and display detailed information of motorbikes with the entered manufacturer (using the same format as in section 4).
-
If no motorbike is found, display:
There are no motorbikes of this manufacturer.
This module must be implemented in a separate function that:
-
Has a
motorbike_ststruct array as an argument.
6. Save to Text File
When the user chooses option 4:
-
Save the name and manufacturer of each motorbike to a text file named
motorbike.txt.
This module must be implemented in a separate function that:
-
Has a
motorbike_ststruct pointer as an argument. -
Creates the file
motorbike.txtin text mode. -
Writes the name and manufacturer of each motorbike to the file.
-
Closes the file.
7. Exit
When the user chooses option 5, the program terminates.
Đăng nhập để làm bài kiểm tra
Chưa có kết quả nào trước đó
Chương trình
Nguyễn Văn An
Trần Thị Bích
Lê Hoàng Hải
Phạm Minh Tuấn
Đánh giá
B2. Đăng ký học
B3. Hoàn thành mua khoá học
B4. Thanh toán theo hướng dẫn
B5. Đợi chúng tôi kiểm tra thông tin và thêm bạn vào lớp học
Bước 1: Truy cập website https://gozic.vn/teacher/form
Bước 2: Điền thông tin theo yêu cầu. Để bản đăng ký được duyệt nhanh nhất, anh chị hãy điền đủ thông tin nhé.
Bước 3: Click vào "đăng ký ngay" để hoàn thành
Lưu ý:
Link video bài giảng mẫu: Video bài giảng mẫu là căn cứ để Trắc Nghiệm Việt duyệt về hình thức và chất lượng giảng dạy. Vì vậy anh chị hãy điền link này để đăng ký được duyệt nhanh nhất nhé.
Anh chị cũng nên mô tả kỹ về kinh nghiệm giảng dạy để Trắc Nghiệm Việt đánh giá nhé.
Chúc các anh chị và các bạn thành công, sớm gia nhập đội ngũ giảng viên Trắc Nghiệm Việt!
200,000 VNĐ
999,000 VNĐ
Tổng quan khóa học
- Bài học 62
- Thời gian Linh hoạt
- Mức độ Mới bắt đầu
- Ngôn ngữ Tiếng việt
- Chứng chỉ Không
Trần Văn Điệp
Founder tại QViet.vn