6.4
unknown
c_cpp
3 years ago
342 B
11
Indexable
#include <iostream>
#include <string>
using namespace std;
int main()
{
string word;
cout << "Podaj slowo: ";
cin >> word;
int n;
cout << "Podaj liczbe n: ";
cin >> n;
string result;
for (int i = 0; i < n; i++)
{
result += word;
}
cout << "Wynik: " << result << endl;
return 0;
}
Editor is loading...