Răspuns:
3.
#include <iostream>
#include <ctime>
using namespace std;
int main()
{
int aleator, n;
cout << "n: ";
cin >> n;
srand(time(NULL));
for(int i=0; i<n; i++)
{
aleator = rand() % 49 + 1;
cout << aleator << endl;
}
return(0);
}
4.
#include <iostream>
using namespace std;
int main()
{
string n;
cin >> n;
if(n == "*")
{
cout << "C" << endl;
}
else
{
cout << n << endl;
}
return(0);
}