diff --git a/src/excercises/celsius.cc b/src/excercises/celsius.cc new file mode 100644 index 0000000..4c44914 --- /dev/null +++ b/src/excercises/celsius.cc @@ -0,0 +1,15 @@ + +#include + +using namespace std; + +int main() { + + int fahrenheit; + cout << "Enter fahrenheit value: "; + cin >> fahrenheit; + double celsius = (fahrenheit - 32) / 1.8; + cout << "Celsius: " << celsius; + + return 0; +} diff --git a/src/excercises/circles.cc b/src/excercises/circles.cc new file mode 100644 index 0000000..64e476e --- /dev/null +++ b/src/excercises/circles.cc @@ -0,0 +1,15 @@ +#include +#include + +using namespace std; + +int main() { + + int radius; + cout << "Enter radius of circle: "; + cin >> radius; + + // I'm awesome, the teacher didn't know about the PI constant in cmath + cout << "Result: " << M_PI * pow(radius, 2); + return 0; +}