Archived
1
0
Fork 0

Compare commits

...

2 commits

Author SHA1 Message Date
32c530ced1
🏗️ Make main file 2024-02-06 18:41:13 +01:00
1b6aabc1b5
🍻 More excercise files 2024-02-06 18:40:58 +01:00
3 changed files with 40 additions and 0 deletions

15
src/excercises/celsius.cc Normal file
View file

@ -0,0 +1,15 @@
#include <iostream>
using namespace std;
int main() {
int fahrenheit;
cout << "Enter fahrenheit value: ";
cin >> fahrenheit;
double celsius = (fahrenheit - 32) / 1.8;
cout << "Celsius: " << celsius;
return 0;
}

15
src/excercises/circles.cc Normal file
View file

@ -0,0 +1,15 @@
#include <cmath>
#include <iostream>
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;
}

10
src/main.cc Normal file
View file

@ -0,0 +1,10 @@
#include <iostream>
using namespace std;
int main() {
return 0;
}