0% found this document useful (0 votes)
3 views1 page

C Programs

The document outlines six C++ programming tasks, including calculating the area and perimeter of a rectangle, displaying even numbers from 1 to 100, swapping two numbers, summing an array of ten numbers, calculating the factorial of a number, and checking if a number is positive or negative.

Uploaded by

realaee2
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)
3 views1 page

C Programs

The document outlines six C++ programming tasks, including calculating the area and perimeter of a rectangle, displaying even numbers from 1 to 100, swapping two numbers, summing an array of ten numbers, calculating the factorial of a number, and checking if a number is positive or negative.

Uploaded by

realaee2
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

C++ programs

1.​ Write a C++ program to calculate the area and perimeter of a


rectangle using functions.

2.​ Write a C++ program to display the even numbers between 1 to


100 using a for loop.

3.​ Write a C++ program to swap the two numbers.

4.​ Write a C++ program to accept an array of 10 numbers and add


the values of the array and display the output.

5.​ Write a C++ program to calculate the factorial of a given number.

6.​ Write a C++ program to check whether the number is positive or


negative.

You might also like