Website Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit3c60d6ee611d9c70d8bc01347d2b70e40f068f51 (patch)
Author
 Justsvetoslavov <justsvetoslavov@gmail.com>
2021-10-18 00:47:09 +0300
Committer
 Justsvetoslavov <justsvetoslavov@gmail.com>
2021-10-18 00:47:09 +0300
Filesf4382425fcfb27f364d9dec29e2f5e863b716c7f
Introduction_to_programming_FMI-3c60d6ee611d9c70d8bc01347d2b70e40f068f51.tar
Introduction_to_programming_FMI-3c60d6ee611d9c70d8bc01347d2b70e40f068f51.tar.gz
Introduction_to_programming_FMI-3c60d6ee611d9c70d8bc01347d2b70e40f068f51.zip
Parent20808f9c4ff95355297c3ec00b01661dc58feeb1 (diff)
Parentdba059d02f60f87a36619aaa6a43f3418b7ac790 (diff)
Merge branch 'main' of https://github.com/Angeld55/Introduction_to_programming_FMI
2 files changed, 13 insertions, 3 deletions
-rw-r--r--Sem. 02/Solutions/04. Figures.cpp13
-rw-r--r--Sem. 02/Solutions/05. Time + 15.cpp3
diff --git a/Sem. 02/Solutions/04. Figures.cpp b/Sem. 02/Solutions/04. Figures.cpp
index 170c403..3e4b974 100644
--- a/Sem. 02/Solutions/04. Figures.cpp
+++ b/Sem. 02/Solutions/04. Figures.cpp
@@ -25,4 +25,15 @@ int main()
cin >> R;
cout << PI * R * R << endl;
}
-} \ No newline at end of file
+ else if (figure == 't')
+ {
+ double width;
+ double height;
+ cin >> width >> height;
+ cout << width * height / 2 << endl;
+ }
+ else
+ {
+ cout << "Invalid figure!" << endl;
+ }
+}
diff --git a/Sem. 02/Solutions/05. Time + 15.cpp b/Sem. 02/Solutions/05. Time + 15.cpp
index 826fa50..5eec960 100644
--- a/Sem. 02/Solutions/05. Time + 15.cpp
+++ b/Sem. 02/Solutions/05. Time + 15.cpp
@@ -1,7 +1,6 @@
#include <iostream>
using namespace std;
-const double PI = 3.14;
int main()
{
int hours, mins;
@@ -19,4 +18,4 @@ int main()
if (mins <= 9)
cout << 0;
cout << mins << endl;
-} \ No newline at end of file
+}