admin@onlinelearningcenter.in (+91) 7 999 01 02 03

WAP to design a class to overload a function disp( ) as follows

Sunita Chhetry
110 Posts

WAP to design a class to overload a function disp() as follows:

Double disp(double N) – to calculate and return the sum of the following series:

Sum=1.0  +  1.5 +  2.0 +  2.5……..+n

Int disp(intN) – to calculate and return sum of only odd digits of the number N

Sample input N= 43961 output sum=3+9+1=13

Published By : Sunita Chhetry
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Comments

Jquery Comments Plugin