diff options
| author | Syndamia <kamen@syndamia.com> | 2023-11-16 13:37:19 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2023-11-16 13:37:19 +0200 |
| commit | 9eadad5d80edc766c4f8271f1f92c09b9b6595d7 (patch) | |
| tree | 1f0a09839a28819d269d3f92af821629c16b0646 /week05/ex1.cpp | |
| parent | 14ae37bd8ec06b360cd756652345ee159513209e (diff) | |
| download | upp-2023-solutions-9eadad5d80edc766c4f8271f1f92c09b9b6595d7.tar upp-2023-solutions-9eadad5d80edc766c4f8271f1f92c09b9b6595d7.tar.gz upp-2023-solutions-9eadad5d80edc766c4f8271f1f92c09b9b6595d7.zip | |
[w5] Added solutions
Diffstat (limited to 'week05/ex1.cpp')
| -rw-r--r-- | week05/ex1.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/week05/ex1.cpp b/week05/ex1.cpp new file mode 100644 index 0000000..66a55af --- /dev/null +++ b/week05/ex1.cpp @@ -0,0 +1,13 @@ +#include <iostream> + +void pointSum(double x1, double y1, double x2, double y2, double *x, double *y) { + *x = x1 + x2; + *y = y1 + y2; +} + +int main() { + double x1, y1, x2, y2, sumX, sumY; + std::cin >> x1 >> y1 >> x2 >> y2; + pointSum(x1, y1, x2, y2, &sumX, &sumY); + std::cout << sumX << " " << sumY << std::endl; +} |
