Arish Practical

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Practical No.

1
Objective: Write a program for each if, if-else and else-if.

A) If-statement

Code:-

Result:-

B) If-else statement

Code and result:-


C) else-if statement

Code:-

Result:-
Practical No. 2
Objective:- Write a program using nested if statement.

Code:-

Result:-
Practical No. 3
Objective:- Write a program using switch statement.

Code:-

Result:-
Practical No. 4
Objective:- Write a C++ program that uses for loop.

Code:-

Result:-

Practical No. 5
Objective:- Write a C++ program that uses while loop.

Code: - Result:-
Practical No. 6
Objective:- Write a C++ program that uses do while loop

Code:-

Result:-
Practical No. 7
Objective:- Write a C++ program which stores numeric values in a one dimensional array using for loop and finds the
highest, lowest and average values.

Code:-

Result:-

You might also like