Answer Posted / harry0009
#include<iostream.h>
class sample
{
int a,b;
public:
void setvalue()
{
a = 25;
b = 45;
}
friend float mean(sample s);
};
float mean(sample s)
{
return(float(s.a+& b)/20);
}
void main()
{
sample ;
x.setvalue
cout<<"mean value"<<mean(x);
getch();
}
| Is This Answer Correct ? | 11 Yes | 4 No |
Post New Answer View All Answers
Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor
How can I do serial ("comm") port I/O?
What are the advantages and disadvantages of c language?
What are qualifiers in c?
What are the modifiers available in c programming language?
Is fortran still used today?
What is include directive in c?
the question is that what you have been doing all these periods (one year gap)
How do you sort filenames in a directory?
Can include files be nested?
How do you generate random numbers in C?
What is define directive?
What are c header files?
Is c# a good language?
What are valid operations on pointers?