Skip to content

Commit

Permalink
Merge pull request #3 from harshitjsurana/patch-2
Browse files Browse the repository at this point in the history
formula for perimeter updated
  • Loading branch information
harshitsurana authored Oct 1, 2019
2 parents 924b21f + 383296e commit 1d1b78e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rectangular operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using namespace std;
int main()
{
char ch,ch1;
float a,area,peri,l,b,diagonal;
float a,area,perimeter,l,b,diagonal;
cout << "Mathematical Operator World:" <<"\n";
cout << "1.Area" <<"\n";
cout << "2.Perimeter" <<"\n";
Expand All @@ -30,8 +30,8 @@ int main()
case'1':area=l*b;
cout<<"Area Is : "<<area<<"\n";
break;
case'2':peri=2*(l+b);
cout<<"Perimeter Is : "<<peri<<"\n";
case'2':perimeter=2*(l+b);
cout<<"Perimeter Is : "<<perimeter<<"\n";
break;
case'3':diagonal=sqrt((l*l)+(b*b));
cout<<"Diagonal Is : "<<diagonal<<"\n";
Expand Down

0 comments on commit 1d1b78e

Please sign in to comment.