ultimatepp/uppdev/Jasa/Jasa.cpp
cxl 3cd394812c Merge continued
git-svn-id: svn://ultimatepp.org/upp/trunk@10263 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2016-10-04 08:34:39 +00:00

40 lines
No EOL
544 B
C++

#include <Core/Core.h>
using namespace Upp;
String ReadString(const char *txt)
{
Cout() << txt;
return ReadStdIn();
}
int ReadInt(const char *txt = "")
{
return StrInt(ReadString(txt));
}
double ReadDouble(const char *txt = "")
{
return StrDbl(ReadString(txt));
}
CONSOLE_APP_MAIN
{
pocitani:
int l = 1;
int a = ReadInt("Zadej cislo: ");
for(int i = 1; i <= a; i++) {
l=l*i;
Cout() << l << '\n';
}
Cout() << l << '\n';
goto pocitani;
}
/*
1*1 = 1
1*2 = 2
2*3 = 6
6*4 = 24
*/