S. Maik Programmer.

S. Maik Programmer.

Share

Programming is way to enjoy of mine. Programing =Changing=ideas. Start 0 to 99!

31/03/2015

4th semester start!

14/08/2014

HaPpy INDEPENDENCE DAY..
68 Happy Birthday.

13/08/2014

Today the Finally 2nd Semester exam Done!

05/08/2014

(2nd Semester)Spring 2014 Final Exam :P
Not Fully Prepared! But still Hoped!

28/07/2014

Learning | Innovation | Excellence

30/05/2014

To find the mean value of a given number using friend function.
ALGORITHM:
STEP 1: Start the program.
STEP 2: Declare the class name as Base with data members and member functions.
STEP 3: The function get() is used to read the 2 inputs from the user.
STEP 4: Declare the friend function mean(base ob) inside the class.
STEP 5: Outside the class to define the friend function and do the following.
STEP 6: Return the mean value (ob.val1+ob.val2)/2 as a float.
STEP 7: Stop the program.
PROGRAM:


class base
{
int val1,val2;
public:
void get()
{
coutval1>>val2;
}
friend float mean(base ob);
};
float mean(base ob)
{
return float(ob.val1+ob.val2)/2;
}
void main()
{
clrscr();
base obj;
obj.get();
cout

09/05/2014

1st quarter Mid Done!

01/05/2014

"1at May"
"Labour's Day"

28/04/2014

Class 0f

using namespace std;
class Circle
{
private:
float radius;
public:
void get_radius(float r)
{
radius=r;
}
void area()
{
cout

28/04/2014

Class of

using namespace std;
class Book
{
private:
int BookID,pages;
float Price;
public:
void get()
{
coutBookID;
coutpages;
coutPrice;

}
void show()
{

cout

27/04/2014

Three data members store three marks!
Class 0f

using namespace std;
class Marks
{
private:
int a,b,c;
public:
void in()
{

couta>>b>>c;
}
int sum()
{
return a+b+c;

}
int avg()
{
return (a+b+c)/3.0;

}
};
int main()
{
Marks m;
int s;
float a;
m.in();
s=m.sum();
a=m.avg();
cout

Want your school to be the top-listed School/college in Sialkot?

Click here to claim your Sponsored Listing.

Location

Category

Website

Address


Sialkot
51310