Skip to content

Commit e22d09f

Browse files
committed
G1CalculateFormula
1 parent 4c22e98 commit e22d09f

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

G1CalculateFormula.cpp

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#include<iostream>
2+
#include<cmath>
3+
4+
using std::cout;
5+
using std::string;
6+
using std::cin;
7+
using std::endl;
8+
9+
int main( ){
10+
double a, b, c;
11+
12+
cout<<"Enter the side A :";
13+
cin>>a;
14+
cout<<"Enter the side B :";
15+
cin>>b;
16+
//---=== Method 1 ==----/
17+
// a = pow(a,2);
18+
// b = pow(b,2);
19+
// c = sqrt(a + b );
20+
// cout<<"Side C : "<<c<<endl;
21+
//---=== Method 2 ==----/
22+
cout<<"Side C :"<<sqrt(pow(a,2)+ pow(b,2))<<endl;
23+
24+
return 0;
25+
}

G1CalculateFormula.exe

142 KB
Binary file not shown.

0 commit comments

Comments
 (0)