From e55e9fb058a046f6f1e08da521660a8d98b1d5db Mon Sep 17 00:00:00 2001 From: Justsvetoslavov Date: Tue, 2 Nov 2021 16:23:53 +0200 Subject: Added Solutions --- pract_SI/Pract. 04/Solutions/task5.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 pract_SI/Pract. 04/Solutions/task5.cpp (limited to 'pract_SI/Pract. 04/Solutions/task5.cpp') 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 +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 -- cgit v1.3.1-23-gd82d