Глава 4 закончена

This commit is contained in:
Alexander Zhirov 2023-02-25 17:15:12 +03:00
parent 141dd624b1
commit e57718386b
26 changed files with 442 additions and 2 deletions

View file

@ -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;
}