C- index
C- index
18 Write programs using conditional statements and loops: Generate various patterns
(triangles,diamond and other patterns) with numbers.
19 Write programs using conditional statements and loops: Test for prime numbers.
20 Write a program to declare a class „staff‟ having data members as name and
post.accept this data 5 for 5 staffs and display names of staff who are HOD.
21 Write a program to declare class „Distance‟ have data members dist1,dist2 ,dist3.
Initialize the two data members using constructor and store their addition in third
data member using function and display addition.
22 Write a program to accept a number from the user and throw an exception if the
number is not an even number.