6.4

 avatar
unknown
c_cpp
3 years ago
342 B
6
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...