Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 02
diff options
context:
space:
mode:
Commitdba059d02f60f87a36619aaa6a43f3418b7ac790 (patch)
Author
 Angel Dimitriev <achi_d@abv.bg>
2021-10-17 17:14:03 +0300
Committer
 GitHub <noreply@github.com>
2021-10-17 17:14:03 +0300
Files4490f831f32252f468d12626356c1aa9305e3b45 /Sem. 02
Introduction_to_programming_FMI-dba059d02f60f87a36619aaa6a43f3418b7ac790.tar
Introduction_to_programming_FMI-dba059d02f60f87a36619aaa6a43f3418b7ac790.tar.gz
Introduction_to_programming_FMI-dba059d02f60f87a36619aaa6a43f3418b7ac790.zip
Parent5070e11f087e4dab755bce1fc43eacee37eb51bf (diff)
Parent61a1a195e4eea5cdea8355fd7d9c78d7c84b6ad2 (diff)
Merge pull request #1 from MariaGrozdeva/patch-1
Update 04. Figures.cpp
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;
+ }
+}