-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finishing of old pi to new pi C++ and java files
- Loading branch information
1 parent
0194134
commit 924d1da
Showing
3 changed files
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
|
||
.DS_Store | ||
.vscode/settings.json |
24 changes: 24 additions & 0 deletions
24
Convert different pi numbers to new pi/Old_pi_to_new_pi.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,29 @@ | ||
#include <iostream> | ||
|
||
using namespace std; | ||
|
||
int main(){ | ||
// Number used as diameter | ||
double diamiter = 10; | ||
|
||
// Radius variable | ||
double radius = diamiter / 2; | ||
|
||
// Stating of input request | ||
cout << "input variation of pi you wand to preform the calculation on:" << endl; | ||
|
||
// Input var deceleration | ||
double pi; | ||
|
||
// Input usage | ||
cin >> pi; | ||
|
||
// Calculation | ||
double cal1 = ((radius * radius)* pi) / 100; | ||
|
||
// Display result | ||
cout << "The new pi is: " + to_string(cal1) << endl; | ||
cout << "Thank you for using Seiling old pi to new pi converter." << endl; | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters