Document 2 1
Document 2 1
Submitted by : M Ikram
Submitted to : Mam Maria
Student ID : 41309
Program : BsCs
Course : Programming Fundamentals
Date:Nov,202,2024
LAB # 3
Task – 1
Write a C++ program that inputs a 3 digit value from the user (for example 521) and display
it in reverse order (i.e. 125).
Task - 2 Write a C++ program that inputs a 4 digit value from the user (for example 6382)
and displays a result with an increment of 1 in each digit (i.e. 7493).
Task – 3
Input the values for base and exponent and calculate its power using the pow(x,y) built in
function.
Task - 4
Write a C++ program that finds the area of a triangle given the length of its sides: a, b, c. S =
(a+b+c)/2 Area = sqrt(s * (s - a) * (s - b) * (s - c)).
Task – 5
Write a C++ program that ask the user to type 2 integers A and B and exchange the value of
A and B without using a third variable.