Cod sursa(job #1698313)
Utilizator | Data | 4 mai 2016 08:30:33 | |
---|---|---|---|
Problema | Semne | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.33 kb |
#include <fstream>
#include <cstdlib>
using namespace std;
ifstream fin("semne.in");
ofstream fout("semne.out");
int main()
{
int x;
fin >> x;
for (int i = 1; i <= x; ++i) {
bool value = rand() % 2;
if (value)
fout << "+";
else
fout << "-";
}
return 0;
}