Website Summary Files Commits Branches @commit @diff @stats
path: root / pract_SI / Pract. 04 / Solutions / task5.cpp
diff options
context:
space:
mode:
1 files changed, 20 insertions, 0 deletions
-rw-r--r--pract_SI/Pract. 04/Solutions/task5.cpp20
diff --git a/pract_SI/Pract. 04/Solutions/task5.cpp b/pract_SI/Pract. 04/Solutions/task5.cpp
new file mode 100644
index 0000000..fc5552e
--- /dev/null
+++ b/pract_SI/Pract. 04/Solutions/task5.cpp
@@ -0,0 +1,20 @@
+#include <iostream>
+using namespace std;
+void print(const int N, const char S = ' ')
+ {
+ for (size_t i = 0; i < N; i++)
+ {
+ cout << S;
+ }
+ }
+
+int main()
+{
+ int N;
+ char S;
+ cin >> N >> S;
+ print(N);
+ cout<< "Error!" << endl;
+ print(N, S);
+ return 0;
+} \ No newline at end of file