Professional Documents
Culture Documents
CCS0006L
(COMPUTER PROGRAMMING 1)
EXERCISE
1
FAMILIARIZATION OF C++ ENVIRONMENT
Section:
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]
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. #include <iostream>
return 0;
Problem 2. Create a project named swap then create a program that swaps the two numbers entered
by the user.
Block of Codes Block of Codes
(in correct order)
A. #include <iostream>
using namespace std;
// Project Swap
int main ()
B. {
int a, b, c;
return 0;
G. }
Problem 3. Create a project named leap then create a program that identifies whether the inputted year
is a leap year or not.
Block of Codes Block of Codes
(in correct order)
A. #include <iostream>
int main ()
B.
{
int year;
cout << “Enter a year:“;
C.
if (( year % 4) == 0)
{
D.
Cout << “ Leap Year ”;
Else
E.
{
Cout << “ Not A Leap Year”
<<endl;
}
Return 0;
V. 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