Skip to content

Commit 0249bcf

Browse files
Love
1 parent 5b7614e commit 0249bcf

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

TTS.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include <iostream>
2+
3+
using namespace std;
4+
5+
template <class t>
6+
7+
void printAllPairs(t *arr, int size) {
8+
for (int i = 1; i < size; i++) {
9+
for (int j = 0; j < i; j++) {
10+
cout << arr[j];
11+
}
12+
cout << endl;
13+
}
14+
}
15+
16+
int main() {
17+
18+
char arr[] = "I Love You Taskin";
19+
int size = sizeof(arr) / sizeof(arr[0]);
20+
printAllPairs(arr, size);
21+
return 0;
22+
}

0 commit comments

Comments
 (0)