Lab-3 Journal-03-21032023-112253am
Lab-3 Journal-03-21032023-112253am
CLO1 Demonstrate the understanding of programing language PLO2:Knowledge for Solving Computing
syntax and its usage Problems
CLO2 Apply basic programming structures for logic construction PLO3:Problem Analysis
CLO3 Translate the devised solutions into computer programs and PLO5:Modern Tool Usage
test the implementation
Objective(s):
Upon completion of this lab session, learners will be able to:
• Understand the Data types and variables
• Understand the use of Operators
Tasks
Task 01:
Write a program that gets 2 integers input from user and store them in variables. Do the
five basic Arithmetic Operations (+, - , *, /, %) of the two numbers. Print the results of
operations as below.
%
Task 02:
Write a program that prompt user to input course name, obtained marks and total marks.
Calculate the percentage using the below formula
marks_percentage = ( marks_obtained / total )* 100
and display the results as follows.
Task 03:
Write a program that converts Celsius temperatures to Fahrenheit temperatures. The
formula is:
F= (9/5)*C+32
F is the Fahrenheit temperature and C is the Celsius temperature.
Task 04:
Write a C++ program that prompts the user to enter an integer and determines if it's even or
odd using only if and else statements.
Task 05:
Write a C++ program that prompts the user to enter their income and calculates the tax based
on the following brackets:
Task 06:
Page 2 of 4
%
Write a C++ program that takes an integer input representing the day number and outputs the
corresponding day of the week using only if statements. The program should prompt the user
to enter a number between 1 and 7, and output the corresponding day of the week based on
the following conditions:
If the input is not between 1 and 7, output "Invalid input. Please enter a number between 1
and 7."
Task 07:
Write a C++ program that takes an integer input and outputs whether it's a Saturday, Sunday,
or Monday. The program should calculate the number of days since Monday using the %
operator and output the corresponding day of the week based on the following conditions:
Page 3 of 4
%
Max Obtained
Task Comments (if any)
Marks Marks
1. 05
2. 05
3. 05
4. 05
5 05
6 05
7 05
Total 35 Signature
Note: Attempt all tasks and get them checked by your Lab Instructor.
Page 4 of 4