Глава 4 закончена
This commit is contained in:
parent
141dd624b1
commit
e57718386b
26 changed files with 442 additions and 2 deletions
|
@ -0,0 +1,18 @@
|
|||
import std.conv, std.stdio;
|
||||
|
||||
int main(string[] args)
|
||||
{
|
||||
// Избавиться от имени программы
|
||||
args = args[1 .. $];
|
||||
while (args.length >= 2)
|
||||
{
|
||||
if (to!int(args[0]) != to!int(args[$ - 1]))
|
||||
{
|
||||
writeln("не палиндром");
|
||||
return 1;
|
||||
}
|
||||
args = args[1 .. $ - 1];
|
||||
}
|
||||
writeln("палиндром");
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue