mirror of
https://github.com/szymon-jozef/ZUT-notatki.git
synced 2026-10-28 11:10:38 +01:00
bla bla
This commit is contained in:
13
uczelnia/2_semestr/programowanie/laby/lab12/zad7.cpp
Normal file
13
uczelnia/2_semestr/programowanie/laby/lab12/zad7.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <iostream>
|
||||
|
||||
template <typename T, int N> void powtorz(const T &wartosc) {
|
||||
for (int i = 0; i < N; i++) {
|
||||
std::cout << wartosc;
|
||||
}
|
||||
std::cout << '\n';
|
||||
}
|
||||
|
||||
int main() {
|
||||
powtorz<char, 5>('*'); // *****
|
||||
powtorz<int, 3>(7); // 7 7 7
|
||||
}
|
||||
Reference in New Issue
Block a user