Cod sursa(job #734149)
Utilizator | Data | 13 aprilie 2012 17:39:34 | |
---|---|---|---|
Problema | Fructe | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.37 kb |
#include <fstream>
int main (void)
{
unsigned short t;
unsigned int a;
char trash [10];
std::ifstream input("fructe.in");
input >> t;
std::ofstream output("fructe.out");
do
{
input >> trash >> a;
output << (a % 2 ? '1' : '0') << '\n';
--t;
}
while (t);
input.close();
output.close();
return 0;
}