0% found this document useful (0 votes)
6 views4 pages

Document 2 1

Uploaded by

ikramimtiaz147
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

Document 2 1

Uploaded by

ikramimtiaz147
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

LAB TASKS

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.

You might also like