# include <iostream.h>
# include <stdlib.h>
# include <math.h>
# include <conio.h>
class student
{
public:
int rn (int);
double fees (double);
};
int student:: rn (int r)
{
int ans;
ans=abs (r);
return (ans);
}
double student::fees (double f)
{
double ans;
ans=fabs (f);
return (ans);
}
void main ( )
{
clrscr ( );
student st;
cout <<"\n Absolute value of -12 is "<<st.rn (-12);
cout <<"\n Absolute value of -12.4142 is "<<st.fees (-12.4142);
getch();
}
Dinesh Thakur holds an B.C.A, MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.
Related Articles
Basic Courses
Advance Courses