1. Trang chủ
  2. » Tất cả

nhập môn điện toán,phạm trần vũ,dhbkhcm

1 6 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Lab 3: programming objectives: practice with programming environments
Tác giả Phạm Trần Vũ
Trường học Ho Chi Minh City University of Technology
Chuyên ngành Introduction to Computer Science
Thể loại Lab
Định dạng
Số trang 1
Dung lượng 44,19 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

nhập môn điện toán,phạm trần vũ,dhbkhcm LAB 3 Programming Objectives Practice with programming environments Steps A Basic concept in programming 1 Source file, executable file, compile, run 2 IDE 3 Wo[.]

Trang 1

LAB 3: Programming Objectives: Practice with programming environments

Steps:

A Basic concept in programming

1 Source file, executable file, compile, run

2 IDE

3 Workspace, project

4 Syntax error, bug, coding style, …

B Turbo C

1 Copy Samples directory into TC30

2 Execute TC.exe to open Turbo C 3.0

3 Open source file Exercise1.cpp from Samples directory This program solve quadratic equation: ax2 + bx +c = 0

4 Press Ctrl+F9 execute the program

5 Enter values for a, b, c examining program output in console Change the values of a, b, and c to see the effects of changes

6 Similarly, continue to exercise with Exercise2, 3, 4, 5 and 6 Analyze the code and note down what the problems these programs are trying to solve are

C Visual C

1 Start VC from desktop (Start -> All Programs -> Microsoft Visual Studio -> Visual C++)

2 Create a simple project

a Go to File -> New, select Project tab

b Select Win32 Console Application

c Enter a name in Project name

d Select the location to save the project Location, then press OK

e A new dialog box will open (Win32 Console Application – Step 1 of 1) to

help create a new project Select An empty project

f Press Finish create an empty project

3 Add source files

- From Project -> Add To Project -> Files, select file Exercise1.cpp from Samples directory, then OK This step can be varied depending on the version

of Visual C++

4 Execute the program

- Select Build -> Build your_project_name.exe, and then Build -> Execute your_project_name.exe

- Alternatively, press F5

5 Carry the above steps for Exercise 2, 3, 4, 5, and 6

Ngày đăng: 25/11/2022, 16:43