mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-17 14:16:10 -06:00
21 lines
293 B
C++
21 lines
293 B
C++
#include <Core/Core.h>
|
|
|
|
using namespace Upp;
|
|
|
|
int Trn(int x)
|
|
{
|
|
if(x % 2)
|
|
return x + 1;
|
|
else
|
|
return x;
|
|
}
|
|
|
|
|
|
CONSOLE_APP_MAIN
|
|
{
|
|
for(;;) {
|
|
Cout() << "Zadej cislo x: ";
|
|
int cislo = atoi(ReadStdIn());
|
|
Cout() << "Trn(" << cislo << ") = " << Trn(cislo) << "\n";
|
|
}
|
|
}
|