Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 02 / Solutions / 04. Figures.cpp
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 /Sem. 02/Solutions/04. Figures.cpp
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
1 files changed, 12 insertions, 1 deletions
-rw-r--r--Sem. 02/Solutions/04. Figures.cpp13
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;
+ }
+}