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