cout<<"Enter the Base & Hieght of Triangle: "; cin>>b>>h; cout<<'\n'; result=area(0.5,b,h); cout<<'\n'; cout<<"The area of Triangle: "<>r; result=area(r); cout<<'\n'; cout<<"the area of Circle:"<>l>>b; result=area(l,b); cout<<'\n'; cout<<"The area of Rectangle:"<<result<<endl;
cout<<"Enter the Base & Hieght of Triangle: "; cin>>b>>h; cout<<'\n'; result=area(0.5,b,h); cout<<'\n'; cout<<"The area of Triangle: "<>r; result=area(r); cout<<'\n'; cout<<"the area of Circle:"<>l>>b; result=area(l,b); cout<<'\n'; cout<<"The area of Rectangle:"<<result<<endl;
cout<<"Enter the Base & Hieght of Triangle: "; cin>>b>>h; cout<<'\n'; result=area(0.5,b,h); cout<<'\n'; cout<<"The area of Triangle: "<>r; result=area(r); cout<<'\n'; cout<<"the area of Circle:"<>l>>b; result=area(l,b); cout<<'\n'; cout<<"The area of Rectangle:"<<result<<endl;
cout<<"Enter the Base & Hieght of Triangle: "; cin>>b>>h; cout<<'\n'; cout<<"The area of Triangle: "<>r; cout<<'\n'; cout<<"the area of Circle:"<>l>>b; cout<<'\n'; cout<<"The area of Rectangle:"<<area(l,b)<<endl;
cout<<"Enter the Base & Hieght of Triangle: "; cin>>b>>h; cout<<'\n'; cout<<"The area of Triangle: "<>r; cout<<'\n'; cout<<"the area of Circle:"<>l>>b; cout<<'\n'; cout<<"The area of Rectangle:"<<area(l,b)<<endl;
cout<<"Enter the Base & Hieght of Triangle: "; cin>>b>>h; cout<<'\n'; result=area(0.5,b,h); cout<<'\n'; cout<<"The area of Triangle: "<>r; result=area(r); cout<<'\n'; cout<<"the area of Circle:"<>l>>b; result=area(l,b); cout<<'\n'; cout<<"The area of Rectangle:"<<result<<endl;
cout<<"Enter the Base & Hieght of Triangle: "; cin>>b>>h; cout<<'\n'; cout<<"The area of Triangle: "<>r; cout<<'\n'; cout<<"the area of Circle:"<>l>>b; cout<<'\n'; cout<<"The area of Rectangle:"<<area(l,b)<<endl;
Write a C++ program to find area of triangle, circle,and rectangle using function overloading.
# include # include using namespace std;
void area (int Redius) { cout<>Redius; area (Redius); cout<>Base>>height; area (Base,height); cout<>length>>Breadth; area (length,Breadth); getch(); return 0;
Name-Main Uddin Id-201421090 Batch-46 # include # include using namespace std;
void area (int Redius) { cout<<endl<<"Area of Cirle="<<3.142*Redius*Redius; }
void area (int Base ,int height) { cout<<endl<<"Area of Tringle="<<0.5*Base*height; } void area (float length,float Breadth) { cout<<endl<<"Area of rectangle="<<length*Breadth; }
Name -Main Uddin id-201421090 Batch-46 Write a C++ program to find area of triangle, circle,and rectangle using function overloading Second Part--------
int main() { int Redius,Base,height; float length,Breadth; cout<>Redius; area (Redius); cout<>Base>>height; area (Base,height); cout<>length>>Breadth; area (length,Breadth); getch(); return 0;
///Tisha ///201930034 #include using namespace std; int area(int); int area(int,int); float area(float); int main() { int x,y,z; float a; cout<<"Enter area of a triangle:"; cin>>x; cout<<"Enter area of a circle:"; cin>>y>>z; cout<<"Enter area of rectangle:"; cin>>a; cout<<"\nArea of rectangle is "<<area(a); cout<<"\nArea of circle is "<<area(y,z); cout<<"\nArea of triangle is "<<area(x); } int area(int a) { return(a*a); } int area(int y,int z) { return(y*z); } float area(float x) { return(3.14*x*x); }
#include using namespace std; float area(float base,float height) {
return((base*height)/2); } float area(float radius) { return (3.14*radius*radius); } int area (int length, int bredth); } int main () { int length ,bredth; float base,height,radius ;
cout<<"enter base and height of triangle:"; cin>> base>> height ; cout <<"enter radius of circle :"; cin>>radius; cout <<"enter length and bredth of rectangle :"; cin>>length >>bredth;
cout<<"\n area of triangle is"<<area (base,height) ; cout<<"\n area of circle is"<<area(radius); cout<<"\n area of rectangle is "<<area(length,bredth) <<endl;
#include float p=3.14 float area (float n,float b,float h) { float a; a=n*b*h; return a; } float area(float r) { float a; a=p*r*r; return a; } float area(float l,float b) { float a a=l*b; return a; } void main () { float b,h,r,l; float result ; clscr(); cout<<"\n enter the base:\n; cin>>b; cout<<" \n enter the hight triangle:\n"; cin>>h; result=area() cout<<"\n the area of triangle :" <>r; result =area(r); cout<<"\n area of circle :"<>l; cout<"\n enter the bredth of rectangle :\n"; cin>>b; result =area (l,b); cout<<" \n area of rectangle :" <<result <<endl; getch() }
#include using namespace std; int area(int); int area(int,int); float area(float); float area(float,float); int main() { int s,l,b; float r,bs,ht; cout<<"Enter side of a square:"; cin>>s; cout<<"Enter length and breadth of rectangle:"; cin>>l>>b; cout<<"Enter radius of circle:"; cin>>r; cout<<"Enter base and height of triangle:"; cin>>bs>>ht; cout<<"Area of square is"<<area(s); cout<<"\nArea of rectangle is "<<area(l,b); cout<<"\nArea of circle is "<<area(r); cout<<"\nArea of triangle is "<<area(bs,ht); } int area(int s) { return(s*s); } int area(int l,int b) { return(l*b); } float area(float r) { return(3.14*r*r); } float area(float bs,float ht) { return((bs*ht)/2); }
using namespace std; #FARJANA KAMAL KONOK ///201930701 int area(int); int area(int,int); float area(float); float area(float,float); int main() { int s,l,b; float r,bs,ht; cout<<"Enter side of a square:"; cin>>s; cout<<"Enter length and breadth of rectangle:"; cin>>l>>b; cout<<"Enter radius of circle:"; cin>>r; cout<<"Enter base and height of triangle:"; cin>>bs>>ht; cout<<"Area of square is"<<area(s); cout<<"\nArea of rectangle is "<<area(l,b); cout<<"\nArea of circle is "<<area(r); cout<<"\nArea of triangle is "<<area(bs,ht); } int area(int s) { return(s*s); } int area(int l,int b) { return(l*b); } float area(float r) { return(3.14*r*r); } float area(float bs,float ht) { return((bs*ht)/2); }
#include
ReplyDelete#include
const float pi=3.14;
float area(float n,float b,float h)
{
float area;
area=n*b*h;
return area;
}
float area(float r)
{
float area;
area=pi*r*r;
return area;
}
float area(float l,float b)
{
float area;
area=l*b;
return area;
}
void main()
{
float b,h,r,l;
float result;
clrscr();
cout<<"\nEnter the Base & Hight of Triangle: \n";
cin>>b>>h;
result=area(0.5*b*h);
cout<<"\nArea of Triangle:"<>r;
result=area(r);
cout<<"\nArea of Circle:"<>l>>b;
result=area(l,b);
cout<<"\nArea of Rectangle:"<<result<<endl;
getch();
}
//Md. Imam Uddin
//ID 201420733
noted and found correct
DeleteThis comment has been removed by the author.
ReplyDeleteID-201420406
Delete#include
#include
Float area(int r)
{
cout<>r;area(r);
cout<>b>>h;
area(b,h);
cout<>l>>br;
area(l,br);
getch();
return 0;
}
I don't think that you submitted full program. main() function is missed. Please check and update your comments.
Delete#include
ReplyDelete#include
const float pi=3.14;
float area(float n,float b,float h)
{
float area;
area=n*b*h;
return area;
}
float area(float r)
{
float area;
area=pi*r*r;
return area;
}
float area(float l,float b)
{
float area;
area=l*b;
return area;
}
void main()
{
float b,h,r,l;
float result;
clrscr();
cout<<"\nEnter the Base & Hight of Triangle: \n";
cin>>b>>h;
result=area(0.5*b*h);
cout<<"\nArea of Triangle:"<>r;
result=area(r);
cout<<"\nArea of Circle:"<>l>>b;
result=area(l,b);
cout<<"\nArea of Rectangle:"<<result<<endl;
getch();
}
Moonmoon Hossain
ID 201420685
its better to change something after get from others
Delete#include
ReplyDeleteusing namespace std;
const float pi=3.14;
float area(float n,float b,float h)
{
return (b*h)/2;
}
float area(float r)
{
return pi*r*r;
}
float area(float l,float b)
{
return l*b;
}
int main()
{
float x,y,area;
int m=2;
x=5;
y=6;
area=(x*y)/m;
cout<<"the area of triangle:"<<area<<endl;
float pi,z;
pi=3.14;
z=2;
area=pi*z*z;
cout<<"the area of circle:"<<area<<endl;
float k,p;
k=8;
p=7;
area=k*p;
cout<<"the area of rectangle:"<<area<<endl;
return 0;
}
Tarif Mohammad
201410876
answer is not correct. submit again after correction.
Delete/* Mujaffor Ali Sumon
ReplyDeleteId-201420170*/
#include
using namespace std;
const float pi=3.14;
float area(float n,float b,float h)
{
float ar;
ar=n*b*h;
return ar;
}
float area(float r)
{
float ar;
ar=pi*r*r;
return ar;
}
float area(float l,float b)
{
float ar;
ar=l*b;
return ar;
}
main()
{
float b,h,r,l;
float result;
cout<<"Enter the Base & Hieght of Triangle: ";
cin>>b>>h;
cout<<'\n';
result=area(0.5,b,h);
cout<<'\n';
cout<<"The area of Triangle: "<>r;
result=area(r);
cout<<'\n';
cout<<"the area of Circle:"<>l>>b;
result=area(l,b);
cout<<'\n';
cout<<"The area of Rectangle:"<<result<<endl;
}
Everything is correct but cout management is not perfectly done under main() body. its not user friendly. you may correct it and submit again.
Deletehttp://itlearn24.blogspot.com/2014/11/c-program-to-find-area-of-triangle.html
Deletei checked and found correct
DeleteTamanna Sultana
ReplyDeleteId: 201421041
#include
Float area(int r)
{
cout<>r;area(r);
cout<>b>>h;
area(b,h);
cout<>l>>br;
area(l,br);
getch();
return 0;
}
its not a complete program. try again.
Delete/*
ReplyDeleteMd. Monir Hossain
ID: 201421112
*/
#include
using namespace std;
const float pi=3.14;
float area(float n,float b,float h)
{
float ar;
ar=n*b*h;
return ar;
}
float area(float r)
{
float ar;
ar=pi*r*r;
return ar;
}
float area(float l,float b)
{
float ar;
ar=l*b;
return ar;
}
main()
{
float b,h,r,l;
float result;
cout<<"Enter the Base & Hieght of Triangle: ";
cin>>b>>h;
cout<<'\n';
result=area(0.5,b,h);
cout<<'\n';
cout<<"The area of Triangle: "<>r;
result=area(r);
cout<<'\n';
cout<<"the area of Circle:"<>l>>b;
result=area(l,b);
cout<<'\n';
cout<<"The area of Rectangle:"<<result<<endl;
}
you must change it something from others program
Delete#include
ReplyDeleteusing namespace std;
const float pi=3.14;
float area(float n,float b,float h)
{
float ar;
ar=n*b*h;
return ar;
}
float area(float r)
{
float ar;
ar=pi*r*r;
return ar;
}
float area(float l,float b)
{
float ar;
ar=l*b;
return ar;
}
main()
{
float b,h,r,l;
float result;
cout<<"Enter the Base & Hieght of Triangle: ";
cin>>b>>h;
cout<<'\n';
result=area(0.5,b,h);
cout<<'\n';
cout<<"The area of Triangle: "<>r;
result=area(r);
cout<<'\n';
cout<<"the area of Circle:"<>l>>b;
result=area(l,b);
cout<<'\n';
cout<<"The area of Rectangle:"<<result<<endl;
}
## Md. Abdus Salam
ID: 201420341
change your program
DeleteAnik adhikary
ReplyDelete201420798
#include
#include
Float area(int r)
{
cout<>r;area(r);
cout<>b>>h;
area(b,h);
cout<>l>>br;
area(l,br);
getch();
return 0;
}
incomplete program. submit again
DeleteMd. Khairul Hasan
ReplyDelete201420529
#include
#include
const float pi=3.14;
float area(float n,float b,float h)
{
float ar;
ar=n*b*h;
return ar;
}
float area(float r)
{
float ar;
ar=pi*r*r;
return ar;
}
float area(float l,float b)
{
float ar;
ar=l*b;
return ar;
}
void main()
{
float b,h,r,l;
float result;
clrscr();
cout<<“\nEnter the Base & Hieght of Triangle: \n”;
cin>>b>>h;
result=area(0.5,b,h);
cout<<“\nArea of Triangle: “<>r;
result=area(r);
cout<<“\nArea of Circle: “<>l>>b;
result=area(l,b);
cout<<“\nArea of Rectangle: “<<result<<endl;
getch();
}
change your program
Deletecreate a simple calculator for addition, subtraction, multiplication and division in c++
ReplyDelete# include
int main()
{
char o;
float num1,num2;
printf("Enter operator either + or - or * or divide : ");
scanf("%c",&o);
printf("Enter two operands: ");
scanf("%f%f",&num1,&num2);
switch(o) {
case '+':
printf("%.1f + %.1f = %.1f",num1, num2, num1+num2);
break;
case '-':
printf("%.1f - %.1f = %.1f",num1, num2, num1-num2);
break;
case '*':
printf("%.1f * %.1f = %.1f",num1, num2, num1*num2);
break;
case '/':
printf("%.1f / %.1f = %.1f",num1, num2, num1/num2);
break;
default:
/* If operator is other than +, -, * or /, error message is shown */
printf("Error! operator is not correct");
break;
}
return 0;
}
answer is not relevant with question
Deletereate a simple calculator for addition, subtraction, multiplication and division in c++
ReplyDelete# include
int main()
{
char o;
float num1,num2;
printf("Enter operator either + or - or * or divide : ");
scanf("%c",&o);
printf("Enter two operands: ");
scanf("%f%f",&num1,&num2);
switch(o) {
case '+':
printf("%.1f + %.1f = %.1f",num1, num2, num1+num2);
break;
case '-':
printf("%.1f - %.1f = %.1f",num1, num2, num1-num2);
break;
case '*':
printf("%.1f * %.1f = %.1f",num1, num2, num1*num2);
break;
case '/':
printf("%.1f / %.1f = %.1f",num1, num2, num1/num2);
break;
default:
/* If operator is other than +, -, * or /, error message is shown */
printf("Error! operator is not correct");
break;
}
return 0;
}
papiya sultana popi
201420270
answer is not relevant with question
DeleteMD: Rashed Prodhania
ReplyDeleteID : 201420763
Batch : 46th
#include
#include
Float area(int r)
{
cout<>r;area(r);
cout<>b>>h;
area(b,h);
cout<>l>>br;
area(l,br);
getch();
return 0;
}
incomplete. submit again
Delete#include
ReplyDeleteclass power
{
public:
inline int square(int n)
{
return n*n;
}
inline int cube(int n)
{
return n*n*n;
}
};
void main()
{
int n,r;
power p;
clrscr();
cout<<“\nEnter the Number: \n” ;
cin>>n;
r=p.square(n);
cout<<“\nSquare of “<<n<<” = “<<r<<endl;
r=p.cube(n);
cout<<“\nCube of “<<n<<” = “<<r<<endl;
getch();
}
Md.Hasmot Hossen
ID:201421066
answer is not relevant with question
Deleteyeasmin Akter
ReplyDeleteID:201420271
Batch:46
#include
#include
Float area(int r)
{
cout<>r;area(r);
cout<>b>>h;
area(b,h);
cout<>l>>br;
area(l,br);
getch();
return 0;
}
incomplete and submit again
Delete
ReplyDelete#include
using namespace std;
const float pi=3.14;
float area(float n,float b,float h)
{
return (b*h)/2;
}
float area(float r)
{
return pi*r*r;
}
float area(float l,float b)
{
return l*b;
}
int main()
{
float x,y,area;
int m=2;
x=5;
y=6;
area=(x*y)/m;
cout<<"the area of triangle:"<<area<<endl;
float pi,z;
pi=3.14;
z=2;
area=pi*z*z;
cout<<"the area of circle:"<<area<<endl;
float k,p;
k=8;
p=7;
area=k*p;
cout<<"the area of rectangle:"<<area<<endl;
return 0;
}
Md.Hasmot Hossen
ID:201421066
noted and found correct.
DeleteC++ program using class to calculate simple interest amount use default value for rate.
ReplyDelete#include
#include
class interest
{
int n;
float rate,p;
public:
void get()
{
cout<<“\nEnter principle Amount & no. of year: \n”;
cin>>p>>n;
}
void cal(float rate)
{
float si;
si=(p*n*rate)/100;
cout<<“\n\nSimple Interest is: “<<si;
}
};
void main()
{
interest i;
clrscr();
i.get();
i.cal(4.5);
getch();
}
Md.Hasmot Hossen
ID:201421066
answer is not relevant with question
DeleteMd.Sanwer Hossen
ReplyDeleteId.201421068
#include
class power
{
public:
inline int square(int n)
{
return n*n;
}
inline int cube(int n)
{
return n*n*n;
}
};
void main()
{
int n,r;
power p;
clrscr();
cout<<“\nEnter the Number: \n” ;
cin>>n;
r=p.square(n);
cout<<“\nSquare of “<<n<<” = “<<r<<endl;
r=p.cube(n);
cout<<“\nCube of “<<n<<” = “<<r<<endl;
getch();
}
answer is not relevant. submit again
DeleteThis comment has been removed by the author.
ReplyDeletepapiya sultana popi
ReplyDelete201420270
#include
#include
Float area(int r)
{
cout<>r;area(r);
cout<>b>>h;
area(b,h);
cout<>l>>br;
area(l,br);
getch();
return 0;
}
incomplete. not correct
Delete/*Sharmin Akhter
ReplyDeleteID-201420769*/
#include
using namespace std;
float interest(float period,float rate,float principle)
{
float calc=(principle*period*rate)/100;
return calc;
}
main()
{
float period;
float rate;
float principle;
cout<<"Enter principle Amount: ";
cin>>principle;
cout<<"--------------------"<<'\n';
cout<<"Enter no. of period: ";
cin>>period;
cout<<"--------------------"<<'\n';
cout<<"Simple Interest is:"<<interest(principle,period,4.5)<<endl<<endl;
}
answer is not relevant with question
Delete/*Sharmin Akhter
ReplyDeleteID-201420769*/
#include
using namespace std;
const float pi=3.14;
float area(float n,float b,float h)
{
float ar;
ar=n*b*h;
return ar;
}
float area(float r)
{
float ar;
ar=pi*r*r;
return ar;
}
float area(float l,float b)
{
float ar;
ar=l*b;
return ar;
}
main()
{
float b,h,r,l;
cout<<"Enter the Base & Hieght of Triangle: ";
cin>>b>>h;
cout<<'\n';
cout<<"The area of Triangle: "<>r;
cout<<'\n';
cout<<"the area of Circle:"<>l>>b;
cout<<'\n';
cout<<"The area of Rectangle:"<<area(l,b)<<endl;
}
error under main() body. correct it and submit again.
Delete/*Razia Sultana
ReplyDeleteID-201420715*/
#include
using namespace std;
const float pi=3.14;
float area(float n,float b,float h)
{
float ar;
ar=n*b*h;
return ar;
}
float area(float r)
{
float ar;
ar=pi*r*r;
return ar;
}
float area(float l,float b)
{
float ar;
ar=l*b;
return ar;
}
main()
{
float b,h,r,l;
cout<<"Enter the Base & Hieght of Triangle: ";
cin>>b>>h;
cout<<'\n';
cout<<"The area of Triangle: "<>r;
cout<<'\n';
cout<<"the area of Circle:"<>l>>b;
cout<<'\n';
cout<<"The area of Rectangle:"<<area(l,b)<<endl;
}
do not copy
Deleteid.201420931
ReplyDelete#include
using namespace std;
const float pi=3.14;
float area(float n,float b,float h)
{
float ar;
ar=n*b*h;
return ar;
}
float area(float r)
{
float ar;
ar=pi*r*r;
return ar;
}
float area(float l,float b)
{
float ar;
ar=l*b;
return ar;
}
main()
{
float b,h,r,l;
float result;
cout<<"Enter the Base & Hieght of Triangle: ";
cin>>b>>h;
cout<<'\n';
result=area(0.5,b,h);
cout<<'\n';
cout<<"The area of Triangle: "<>r;
result=area(r);
cout<<'\n';
cout<<"the area of Circle:"<>l>>b;
result=area(l,b);
cout<<'\n';
cout<<"The area of Rectangle:"<<result<<endl;
}
do not copy
DeleteParvina khatun
ReplyDeleteID.201420931
#include
#include
const float pi=3.14;
float area(float n,float b,float h)
{
float ar;
ar=n*b*h;
return ar;
}
float area(float r)
{
float ar;
ar=pi*r*r;
return ar;
}
float area(float l,float b)
{
float ar;
ar=l*b;
return ar;
}
void main()
{
float b,h,r,l;
float result;
clrscr();
cout<<“\nEnter the Base & Hieght of Triangle: \n”;
cin>>b>>h;
result=area(0.5,b,h);
cout<<“\nArea of Triangle: “<>r;
result=area(r);
cout<<“\nArea of Circle: “<>l>>b;
result=area(l,b);
cout<<“\nArea of Rectangle: “<<result<<endl;
getch();
}
do not copy
Delete/*Mahmudul Hasan Nayeem
ReplyDeleteID-201420790*/
#include
using namespace std;
const float pi=3.14;
float area(float n,float b,float h)
{
float ar;
ar=n*b*h;
return ar;
}
float area(float r)
{
float ar;
ar=pi*r*r;
return ar;
}
float area(float l,float b)
{
float ar;
ar=l*b;
return ar;
}
main()
{
float b,h,r,l;
float result;
cout<<"Enter the Base & Hieght of Triangle: ";
cin>>b>>h;
cout<<'\n';
result=area(0.5,b,h);
cout<<"The area of Triangle: "<>r;
result=area(r);
cout<<'\n';
cout<<"The area of Circle is: "<>l>>b;
result=area(l,b);
cout<<"The area of Rectangle:"<<result<<endl;
}
problem in main() body. cout management problem.
DeleteMd : jalis Mahmud
ReplyDeleteID :201420762
#include
using namespace std;
const float pi=3.14;
float area(float n,float b,float h)
{
float ar;
ar=n*b*h;
return ar;
}
float area(float r)
{
float ar;
ar=pi*r*r;
return ar;
}
float area(float l,float b)
{
float ar;
ar=l*b;
return ar;
}
main()
{
float b,h,r,l;
cout<<"Enter the Base & Hieght of Triangle: ";
cin>>b>>h;
cout<<'\n';
cout<<"The area of Triangle: "<>r;
cout<<'\n';
cout<<"the area of Circle:"<>l>>b;
cout<<'\n';
cout<<"The area of Rectangle:"<<area(l,b)<<endl;
}
not correct. problem in main() body. try to improve cout management.
DeleteName-Main Uddin
ReplyDeleteID-201421090
Batch-46
Write a C++ program to find area of triangle, circle,and rectangle using function overloading.
# include
# include
using namespace std;
void area (int Redius)
{
cout<>Redius;
area (Redius);
cout<>Base>>height;
area (Base,height);
cout<>length>>Breadth;
area (length,Breadth);
getch();
return 0;
}
not correct
DeleteName-Main Uddin
DeleteId-201421090
Batch-46
# include
# include
using namespace std;
void area (int Redius)
{
cout<<endl<<"Area of Cirle="<<3.142*Redius*Redius;
}
void area (int Base ,int height)
{
cout<<endl<<"Area of Tringle="<<0.5*Base*height;
}
void area (float length,float Breadth)
{
cout<<endl<<"Area of rectangle="<<length*Breadth;
}
Name -Main Uddin
Deleteid-201421090
Batch-46
Write a C++ program to find area of triangle, circle,and rectangle using function overloading
Second Part--------
int main()
{
int Redius,Base,height;
float length,Breadth;
cout<>Redius;
area (Redius);
cout<>Base>>height;
area (Base,height);
cout<>length>>Breadth;
area (length,Breadth);
getch();
return 0;
}
Batch-46th
ReplyDeleteID-201420406
#include
#include
float area(float r)
{
return(3.14*r*r);
}
float area(float c,float b,float h)
{
return(b*h*c);
}
float area(float l,float b)
{
return(l*b);
}
void main()
{
float rad,base,ht;
clrscr();
float len,brdth;
cout<<"\nEnter radius :";
cin>>rad;
cout<<"\nArea of circle :"<>base>>ht;
cout<<"\nArea of triangle :"<>len>>brdth;
cout<<"\nArea of rectangle :"<<area(len,brdth);
getch();
}
ID-201420406
ReplyDeletebatch-46th
#include
#include
float area(float r)
{
return(3.14*r*r);
}
float area(float c,float b,float h)
{
return(b*h*c);
}
float area(float l,float b)
{
return(l*b);
}
void main()
{
float rad,base,ht;
clrscr();
float len,brdth;
cout<<"\nEnter radius :";
cin>>rad;
cout<<"\nArea of circle :"<>base>>ht;
cout<<"\nArea of triangle :"<>len>>brdth;
cout<<"\nArea of rectangle :"<<area(len,brdth);
getch();
}
batch-46th
ReplyDeleteid-201420406
#include
#include
void area(int r)
{
cout<<"area of circle="<<3.142*r*r;
}
Void area(int b, int h)
{
cout<>r;
area(r);
cout<>b>>h;
area(b,h);
cout<>L>>br;
area(l,br);
getch();
return 0;
}
Mohammad Ashraful Hasan sobuj
ReplyDeleteCSE-46(Dip)
ID=201420656
#include
using namespace std;
const float pi=3.14;
float area(float n,float b,float h)
float area(float x,float y,float z)
{
float ar;
ar=x*y*z;
cout<<"The area of Triangle : "<>y>>z;
area(0.5,y,z);
cout<<"Enter the radius of circle :";
cin>>n;
area(n);
cout<<"Enter the Lenght & width of Rectangle: ";
cin>>l>>w;
area(l,w);
return 0;
}
Mohammad Ashraful Hasan sobuj
ReplyDeleteCSE-46(Dip)
ID=201420656
#include
using namespace std;
const float pi=3.14;
float area(float x,float y,float z)
{
float ar;
ar=x*y*z;
cout<<"The area of Triangle : "<>y>>z;
area(0.5,y,z);
cout<<"Enter the radius of circle :";
cin>>n;
area(n);
cout<<"Enter the Lenght & width of Rectangle: ";
cin>>l>>w;
area(l,w);
return 0;
}
using c++
ReplyDelete#include
using namespace std;
class overload
{
public:
float ovrload(float r);
double ovrload(float width, float length);
double ovrload(double base, double height);
};
float overload::ovrload(float r)
{
float pi = 3.1416;
return 2*pi*r;
}
double overload::ovrload(float width, float length)
{
return width*length;
}
double overload::ovrload(double base, double height)
{
int sum = 0;
sum = 0.5*base*height;
return sum;
}
int main()
{
float r, width, length;
double base, heit;
overload obj;
cout << "Enter r for for circle --: ";
cin >> r;
cout << "Area of circle --: " << obj.ovrload(r) << endl;
cout << "Enter width for rectangle --: ";
cin >> width;
cout << "Enter length for rectangle --: ";
cin >> length;
cout << "Area of rectangle --: " << obj.ovrload(width, length) << endl;
cout << "Enter base for triangle --: ";
cin >> base;
cout << "Enter height for triangle --: ";
cin >> heit;
cout << "Area of triangle --: " << obj.ovrload(base, heit);
return 0;
}
///Tisha
ReplyDelete///201930034
#include
using namespace std;
int area(int);
int area(int,int);
float area(float);
int main()
{
int x,y,z;
float a;
cout<<"Enter area of a triangle:";
cin>>x;
cout<<"Enter area of a circle:";
cin>>y>>z;
cout<<"Enter area of rectangle:";
cin>>a;
cout<<"\nArea of rectangle is "<<area(a);
cout<<"\nArea of circle is "<<area(y,z);
cout<<"\nArea of triangle is "<<area(x);
}
int area(int a)
{
return(a*a);
}
int area(int y,int z)
{
return(y*z);
}
float area(float x)
{
return(3.14*x*x);
}
//Md.Nayem Hossain
ReplyDelete//Id:202010023
//Batch 63
#include
using namespace std;
class A
{
public:
float pi=3.1416;
float area(float b,float h,float d)
{
cout<<"Area of triangle:"<<(b*h)/d<<endl;
}
float area(float r)
{
cout<<"Area of circle:"<<(pi*r*r)<<endl;
}
float area(float l,float b)
{
cout<<"Area of rectangle:"<<(l*b)<<endl;
}
};
int main()
{
A obj;
obj.area(5.5,6.5,2);
obj.area(3.0,3.5);
obj.area(2.2);
}
#include
ReplyDeleteusing namespace std;
float area(float base,float height)
{
return((base*height)/2);
}
float area(float radius)
{
return (3.14*radius*radius);
}
int area (int length, int bredth);
}
int main ()
{
int length ,bredth;
float base,height,radius ;
cout<<"enter base and height of triangle:";
cin>> base>> height ;
cout <<"enter radius of circle :";
cin>>radius;
cout <<"enter length and bredth of rectangle :";
cin>>length >>bredth;
cout<<"\n area of triangle is"<<area (base,height) ;
cout<<"\n area of circle is"<<area(radius);
cout<<"\n area of rectangle is "<<area(length,bredth) <<endl;
return 0;
}
// Taslima akter
ReplyDelete// id 202010462
// Bathch 63
#include
float p=3.14
float area (float n,float b,float h)
{
float a;
a=n*b*h;
return a;
}
float area(float r)
{
float a;
a=p*r*r;
return a;
}
float area(float l,float b)
{
float a
a=l*b;
return a;
}
void main ()
{
float b,h,r,l;
float result ;
clscr();
cout<<"\n enter the base:\n;
cin>>b;
cout<<" \n enter the hight
triangle:\n";
cin>>h;
result=area()
cout<<"\n the area of triangle :"
<>r;
result =area(r);
cout<<"\n area of circle :"<>l;
cout<"\n enter the bredth of
rectangle :\n";
cin>>b;
result =area (l,b);
cout<<" \n area of rectangle :"
<<result <<endl;
getch()
}
//jamil zilani
ReplyDelete//201930092
#include
using namespace std;
int area(int);
int area(int,int);
float area(float);
float area(float,float);
int main()
{
int s,l,b;
float r,bs,ht;
cout<<"Enter side of a square:";
cin>>s;
cout<<"Enter length and breadth of rectangle:";
cin>>l>>b;
cout<<"Enter radius of circle:";
cin>>r;
cout<<"Enter base and height of triangle:";
cin>>bs>>ht;
cout<<"Area of square is"<<area(s);
cout<<"\nArea of rectangle is "<<area(l,b);
cout<<"\nArea of circle is "<<area(r);
cout<<"\nArea of triangle is "<<area(bs,ht);
}
int area(int s)
{
return(s*s);
}
int area(int l,int b)
{
return(l*b);
}
float area(float r)
{
return(3.14*r*r);
}
float area(float bs,float ht)
{
return((bs*ht)/2);
}
https://drive.google.com/file/d/1m06jJyC8JdG66ZUfBEQbAtOiyZc1zte3/view?usp=sharing
ReplyDeleteusing namespace std;
ReplyDelete#FARJANA KAMAL KONOK
///201930701
int area(int);
int area(int,int);
float area(float);
float area(float,float);
int main()
{
int s,l,b;
float r,bs,ht;
cout<<"Enter side of a square:";
cin>>s;
cout<<"Enter length and breadth of rectangle:";
cin>>l>>b;
cout<<"Enter radius of circle:";
cin>>r;
cout<<"Enter base and height of triangle:";
cin>>bs>>ht;
cout<<"Area of square is"<<area(s);
cout<<"\nArea of rectangle is "<<area(l,b);
cout<<"\nArea of circle is "<<area(r);
cout<<"\nArea of triangle is "<<area(bs,ht);
}
int area(int s)
{
return(s*s);
}
int area(int l,int b)
{
return(l*b);
}
float area(float r)
{
return(3.14*r*r);
}
float area(float bs,float ht)
{
return((bs*ht)/2);
}