Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (185.99 KB, 2 trang )
Course: Programming Fundamentals (C language)
LAB 1 – C Programs: Introduction
Main content:
1.
2.
3.
4.
Get used to IDEs
Get used to programming with the C language
Use the printf() and scanf() functions and other library functions
Check coding styles
Practice:
1. Get used to IDEs
Open the IDE tool and examine the functionalities provided by the tool.
- How to start generating a C source code file
- How to compile a C source code file
- How to run a resulting C program
2. Get used to programming with the C language
2.1. Write a program to find a larger box between two boxes given the width, length, and height
of each box using pseudo code or flowchart.
2.2. Write a program to find the shortest path between two places in a city using pseudo code
or flowchart. It is supposed that a city is viewed in a 2-D space. The city includes n
connected places and each place is represented as a point in that 2-D space.
2.3. Sketch the main components of the program in question (2.1) using the C language
2.4. Sketch the main components of the program in question (2.2) using the C language
3. Use the printf() and scanf() functions and other library functions
3.1. Write a C program to receive the values from the keyboard for the width, length, and height
of each box in question (2.1). Print the information of each box (size, volume) on the screen.
3.2. Write a C program to receive the values from the keyboard for two places in the city in