M1 Technical 1
M1 Technical 1
CCS0006L
(COMPUTER PROGRAMMING 1)
EXERCISE
1
FAMILIARIZATION OF C++ ENVIRONMENT
BSITWMA-TW04
Section:
MS. AIRA RUETAS
Professor:
I. PROGRAM OUTCOME/S (PO) ADDRESSED BY THE LABORATORY EXERCISE
Apply knowledge through the use of current techniques and tools necessary for the IT profession. [PO: I]
Microsoft Visual C++, usually shortened to Visual C++ or MSVC, is the name for the C++, C, and assembly
language development tools and libraries available as part of Visual Studio on Windows. Visual C++ can be used to
write anything from simple console apps to the most sophisticated and complex apps for Windows desktop, from device
drivers and operating system components to cross-platform games for mobile devices, and from the smallest IoT
devices to multi-server high performance computing in the Azure cloud.
B. Build a Project
Once you have entered all of your source code, you are ready to build.
On the menu bar, choose Build > Build Solution from the Build menu or just press Ctrl+Shift+B.
C. Run a Code
You can now run your program.
On the menu bar, choose Debug > Start without debugging or just press Ctrl + F5.
V. LABORATORY ACTIVITY
PROCEDURE:
1. Create two projects namely fun1 and fun2.
2. Encode the following C++ programs in fun1.cpp and fun2.cpp respectively.
3. Build and run the program.
4. Illustrate the output of the program.
1. Run and compile the program. Enter 1981 as the input. Paste the screen output below.
2. Run and compile the program. Enter 2020 as the input. Paste the screen output below.
1. Run and compile the program. Enter 1231 as the input. Paste the screen output below.
2. Run and compile the program. Enter 23432 as the input. Paste the screen output below.
1. Created a project named try then encode the C++ program below in try.cpp
9. The program should add the two numbers. Is the result correct?
Program:
Sample Output:
Problem 1. Create a project named digits then create a program that asks a user a 3-digit number and
displays the hundreds, tens and ones digits of the inputted number.
Block of Codes Block of Codes
(in correct order)
A. C
F
B
B. E
D
A
C.
D.
E.
F.
C.
D.
E.
F.
G.
C.
D.
E.
What is IDE?
The shortcut key that should be pressed in running the program is f10.
The shortcut key that should be pressed in running the program is f11.
Syntax error occurs when the programmer misused or forgets the characters. While the logical error
happens when the output is not successful.
In line 1,6, and 7 shows that there are missing or misused of characters. To avoid this kind of error,
make sure that you place the right characters and remember what they used for.
In Activity 1.2, which line statement(s) consists of logical error? How are you going to correct this
type of error?
In line statement 10 shows that the number should be added not subtracted. To avoid this error you
should analyze your code that shows the right output.
VII. REFERENCES
Abraham (2015). Coding for dummies. John Wiley and Sons: Hoboken, NJ
Zak, D (2015). An Introduction to Programming with C++. 8th Edition
Cadenhead, R et. Al. (2016). C++ in 24 Hours, Sams Teach Yourself (6th Edition).Sams Publishing
McGrath, M. (2017). C++ programming in easy steps (5th ed.). Warwickshire, United Kingdom: Easy
Steps Limited
Tale, T. (2016). C++: The Ultimate Beginners Guide to C++ Programing. CreateSpace Independent
Publishing Platform
http://cs.uno.edu/~jaime/Courses/2025/devCpp2025Instructions.html
RUBRIC:
Criteria 4 3 2 1 Score
A completed
A completed solution is An incomplete
A completed
solution is implemented solution is
solution runs
tested and runs on the required implemented
without errors.
but does not platform, and on the required
It meets all the
meet all the uses the platform. It
specifications
specifications compiler does not
and works for
nd/or work for specified. It compile and/or
all test data.
all test data. runs, but has run.
Solution(x5) logical errors.