Перенос страниц
This commit is contained in:
parent
4d57446057
commit
4c954c9186
129 changed files with 14 additions and 15 deletions
|
@ -1,34 +0,0 @@
|
|||
import std.stdio;
|
||||
import std.conv;
|
||||
|
||||
enum Berries { strawberry, blackberry, blueberry }
|
||||
|
||||
string[] names = [
|
||||
"Клубника",
|
||||
"Ежевика",
|
||||
"Черника"
|
||||
];
|
||||
|
||||
void printBerry(Berries b)
|
||||
{
|
||||
final switch (b)
|
||||
{
|
||||
case b.strawberry:
|
||||
writeln(names[b.strawberry]);
|
||||
break;
|
||||
case b.blackberry:
|
||||
writeln(names[b.blackberry]);
|
||||
break;
|
||||
case b.blueberry:
|
||||
writeln(names[b.blueberry]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
int berry;
|
||||
|
||||
readf("%s\n", berry);
|
||||
printBerry(to!Berries(berry));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue