Basic Examples

Leave a Comment

Loops                         Arrays                         2D Arrays 

1----Write a program that calculate Perimeter of Square

2----Write a program that calculate Perimeter of Rectangle

3----Write a program that calculate Perimeter of Parallelogram

4----Write a program that calculate Perimeter of Trapezoid 

5----Write a program that calculate Perimeter of Circle

6----Write a program that calculate Area of Square 

7----Write a program that calculate Area of Rectangle

8----Write a program that calculate Area of Parallelogram

9----Write a program that calculate Area of Triangle

10---Write a program that calculate Area of Trapezoid 

11---Write a program that calculate Area of Circle

12---Write a program that calculate Area of Ellipse

13---Write a program that calculate Area of Cube (Surface)

14---Write a program that calculate Area of Sphere(Surface)

15---Write a program that calculate Area of Cylender(Surface of Side)

16---Write a program that calculate Area of Cone(Surface)

17---Write a program that calculate Area of Torus(Surface)

18---Write a program that calculate Volume of Cube

19---Write a program that calculate Volume of Rectangular

20---Write a program that calculate Volume of Sphere

21---Write a program that calculate Volume of Ellipsoid 

22---Write a program that calculate Volume of Cylinder

23---Write a program that calculate Volume of Cone

24---Write a program that calculate Volume of Pyramid 

25---Write four different C++ statements that each add 1 to integer variable x. 

26---Write a program that execute it's statements after some interval?
27---Write a program that takes current date and date of birth as input and calculate the number of days from date of birth to current date.

28---Write a program that reads 10 numbers from the user into an array and count the number of negative numbers in it.

29---Write a program that reads 15 double values from a user into an array and prints the floor of each.

30---Write a program that reads 20 characters from the user and prints the upper or lower form of it (as desired). If the user enters a digit or a non-character key the program discards it and reads another character (Your program must not count the wrong input).

31---Write a c++ code to find Greatest Common Division (GCD)? (GCD:- It means the greatest number which divides the Both numbers)

32---Write a c++ programme to print semi-colon without putting semi-colon in cout statement?

33---Write a program that accepts a character and determine either the character is a lowercase letter or uppercase letter.

0 Questions: