Find area of square in C++ by R4R Team

Area of Square:
area=side*side;

program:

#include< iostream>
class r4r
{
public:
int find_area(int side)
{
int area;
area=side*side;
cout<<"Area is "<< area;
}
};
int main() {
int side;
r4r obj;
cout<<"Enter side of the Square"<< endl;
cin>>side;
obj.find_area(side);
}


output-

Enter side of the Square
10
Area is 100




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!