float length,width;
cout<<"Enter the length: ";
cin>>length;
cout<<"Enter the width: ";
cin>>width;
cout<<"The Perimeter of the Rectangle is "<<(2*length)+(2*width)<<endl;
cout<<"The Area of the Rectangle is "<<length*width<<endl;
Code Example |
---|
Cpp :: who to include a library c++ |
Cpp :: iterate over vector in c++ |
Cpp :: c++ encapsulation |
Cpp :: To Lower Case leetcode solution in c++ |
Cpp :: c++ function default argument |
Cpp :: 58. Length of Last Word leetcode solution in c++ |
Cpp :: c++ casting |
Cpp :: cpp create lambda with recursion |
Cpp :: initialize dynamic array c++ to 0 |
Cpp :: remove space in string c++ |
Cpp :: 3d vector c++ resize |
Cpp :: hexadecimal or binary to int c++ |
Cpp :: cpp mutex |
Cpp :: fizzbuzz c++ |
Cpp :: c++ check if string is isogram |
Cpp :: if statement c++ |
Cpp :: c++ char array size |
Cpp :: ascii cpp |
Cpp :: double to float c++ |
Cpp :: vector library c++ |
Cpp :: cpp define |
Cpp :: for loop in cpp |
Cpp :: how to format decimal palces in c++ |
Cpp :: inheritance example in C plus plus |
Cpp :: lower bound and upper bound in c++ |
Cpp :: walk filesystem in c++ |
Cpp :: User defined functions and variables in C++ programming |
Cpp :: c++ class |
Cpp :: programs using vectors in c++ |
Cpp :: how to use for c++ |