#include <iostream>
#include <cstdlib>
#include <ctime>
#include <string>

int main()
{
    std::srand( std::time(nullptr) ) ;

    std::string five_x_seven ;

    for( int i = 0 ; i < 5 ; ++i ) // 5 lines
    {
        for( int j = 0 ; j < 7 ; ++j ) // write 7 random digits per line
        {
            five_x_seven += std::rand() % 10 + '0' ;
            five_x_seven += ' ' ;
        }
        five_x_seven += '\n' ; // and end with a new line
    }

    std::cout << five_x_seven ;
}
