generated from admin/template
lab-03
This commit is contained in:
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -24,7 +24,7 @@
|
||||
"RelativeDocumentMoniker": "lab-03\\Program.cs",
|
||||
"ToolTip": "C:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\Program.cs",
|
||||
"RelativeToolTip": "lab-03\\Program.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAACEAAAAAAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2026-09-08T18:49:46.902Z",
|
||||
"EditorCaption": ""
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
"RelativeDocumentMoniker": "lab-03\\Program.cs",
|
||||
"ToolTip": "C:\\prog-radzh\\works\\Csharp\\lab-03\\lab-03\\Program.cs",
|
||||
"RelativeToolTip": "lab-03\\Program.cs",
|
||||
"ViewState": "AgIAAAAAAAAAAAAAAAAAACEAAAAAAAAAAAAAAA==",
|
||||
"ViewState": "AgIAABsAAAAAAAAAAAAAACwAAAARAAAAAAAAAA==",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2026-09-08T18:49:46.902Z",
|
||||
"EditorCaption": ""
|
||||
|
||||
@@ -19,26 +19,29 @@ Console.WriteLine($"{pokemon1Name} (HP: {pokemon1Hp} | Атака: {pokemon1Atta
|
||||
*/
|
||||
|
||||
// task 2
|
||||
//int choice;
|
||||
//Console.Write("Готовы начать бой? (1 - Да, 0 - Нет): ");
|
||||
|
||||
using System.ComponentModel.Design;
|
||||
//do
|
||||
//{
|
||||
// choice = int.Parse(Console.ReadLine());
|
||||
// if (choice == 1)
|
||||
// {
|
||||
// Console.WriteLine("Вы начали бой!");
|
||||
// }
|
||||
|
||||
int choice;
|
||||
Console.Write("Готовы начать бой? (1 - Да, 0 - Нет): ");
|
||||
// else if (choice == 0)
|
||||
// {
|
||||
// Console.WriteLine("Вы отменили бой!");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Console.WriteLine("Некорректная команда! Попробуйте снова.");
|
||||
// }
|
||||
//} while (choice != 1 && choice != 0);
|
||||
|
||||
// task 3
|
||||
int pokemon1Attack = 12;
|
||||
int pokemon2Hp =
|
||||
|
||||
do
|
||||
{
|
||||
choice = int.Parse(Console.ReadLine());
|
||||
if (choice == 1)
|
||||
{
|
||||
Console.WriteLine("Вы начали бой!");
|
||||
}
|
||||
|
||||
else if (choice == 0)
|
||||
{
|
||||
Console.WriteLine("Вы отменили бой!");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Некорректная команда! Попробуйте снова.");
|
||||
}
|
||||
} while (choice != 1 && choice != 0);
|
||||
|
||||
Reference in New Issue
Block a user