We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

# www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?

Views: 220

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

Attachments:

### Replies to This Discussion

CS201 Assignment 3 Spring 2011
#include <iostream>

#include <cmath>

#include <iomanip>
using namespace std;
int main()

{

float fAreaCircle;

float fCircumferenceCircle;
cout "\nEnter the radius of circle: "  ;

fCircumferenceCircle = (2.0 * M_PI) * radius;
cout "The area of the circle is: " fAreaCircle endl;

cout "The circumference of the circle is: " fCircumferenceCircle endl;
system("Pause");

return 0;

}

In instruction radius 3.5 is a sample output.

Sorry, Bhai Adnan Ayub ke solution mein execute kartay hoye thori si problem hai.

Correct solution is

#include <iostream>

#include <cmath>

#include <iomanip>

using namespace std;

#define PI 3.14

class Circle

{

public:

Circle();

Circle(double);

double calculateArea(double);

double calculateCircum(double);

void display();

};

Circle::Circle()

{

}

Circle::Circle(double r)

{

}

double Circle::calculateArea(double r)

{

return (PI*r*r);

}

double Circle::calculateCircum(double r)

{

return (2*PI*r);

}

void Circle::display()

{

cout "Area of the Circle is  " calculateArea(Circle::radius) endl;

cout "Circumference of the Circle is  " calculateCircum(Circle::radius) endl endl;

}

main()

{

Circle circle1;

Circle circle2(3.5);

circle1.display();

circle2.display();

system("pause");

}

Correct Solution is attached
Attachments:

which one is correct............ any one explain?

Correct Solution is attached
Attachments:
which one is correct? :(

CS201 Assingment no 3 Solution Spring 2011

Attachments:

CS201 Assignment No. 3 solution

#include<iostream.h>
#define PI 3.14
class Circle
{
public:
Circle();
Circle(double);
double calculateArea(double);
double calculateCircum(double);
void display();
};
Circle::Circle()
{
}
Circle::Circle(double r)
{
}
double Circle::calculateArea(double r)
{
return (PI*r*r);
}
double Circle::calculateCircum(double r)
{
return (2*PI*r);
}
void Circle::display()
{
cout "Area of the Circle is " calculateArea(Circle::radius) endl;
cout "Circumference of the Circle is " calculateCircum(Circle::radius) endl
endl;
}
main()
{
Circle circle1;
Circle circle2(3.5);

circle1.display();
circle2.display();
system("pause");
}
CS201 Assignment No. 3 solution

#include<iostream.h>
#define PI 3.14
class Circle
{
public:
Circle();
Circle(double);
double calculateArea(double);
double calculateCircum(double);
void display();
};
Circle::Circle()
{
}
Circle::Circle(double r)
{
}
double Circle::calculateArea(double r)
{
return (PI*r*r);
}
double Circle::calculateCircum(double r)
{
return (2*PI*r);
}
void Circle::display()
{
cout "Area of the Circle is " calculateArea(Circle::radius) endl;
cout "Circumference of the Circle is " calculateCircum(Circle::radius) endl
endl;
}
main()
{
Circle circle1;
Circle circle2(3.5);

circle1.display();
circle2.display();
system("pause");
}

#include<iostream.h>
#include <cmath>
#include <iomanip>
using namespace std;

#define PI 3.14 //definig the macro for PI

class circle //declaration of the class
{

private:

circle();
circle(float);
float circlearea(float);
float circlecircumference(float);
void display();
};

circle::circle()
{
}
circle::circle(float i)
{
}
float circle::circlearea (float i)
{
return (PI*i*i);
}

float circle::circlecircumference (float i)
{
return (2*PI*i);
}
void circle::display()
{