Здравейте! Написах следният код и ми отчете само 66 точки :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Program
{
static void Main()
{
Console.Write("");
int numberOfDeck = int.Parse(Console.ReadLine());
for (int i = 2; i <= numberOfDeck; i++)
{
if (i == 14)
{
Console.Write($"A of spades, ");
Console.Write($"A of clubs, ");
Console.Write($"A of hearts, ");
Console.Write($"A of diamonds");
Console.WriteLine("");
continue;
}
if (i == 11)
{
Console.Write($"J of spades, ");
Console.Write($"J of clubs, ");
Console.Write($"J of hearts, ");
Console.Write($"J of diamonds");
Console.WriteLine("");
continue;
}
if (i == 12)
{
Console.Write($"Q of spades, ");
Console.Write($"Q of clubs, ");
Console.Write($"Q of hearts, ");
Console.Write($"Q of diamonds");
Console.WriteLine("");
continue;
}
if (i == 13)
{
Console.Write($"K of spades, ");
Console.Write($"K of clubs, ");
Console.Write($"K of hearts, ");
Console.Write($"K of diamonds");
Console.WriteLine("");
continue;
}
Console.Write($"{i} of spades, ");
Console.Write($"{i} of clubs, ");
Console.Write($"{i} of hearts, ");
Console.Write($"{i} of diamonds");
Console.WriteLine("");
}
}
}
По този начин ми даде 66 точки. Пробвах и следният вариант ,но не ми отчете нищо :
Console.Write("");
int numberOfDeck = int.Parse(Console.ReadLine());
for (int i = 1; i <= numberOfDeck; i++)
{
if (i == 1)
{
Console.Write($"A of spades, ");
Console.Write($"A of clubs, ");
Console.Write($"A of hearts, ");
Console.Write($"A of diamonds");
Console.WriteLine("");
continue;
}
if (i == 11)
{
Console.Write($"J of spades, ");
Console.Write($"J of clubs, ");
Console.Write($"J of hearts, ");
Console.Write($"J of diamonds");
Console.WriteLine("");
continue;
}
if (i == 12)
{
Console.Write($"Q of spades, ");
Console.Write($"Q of clubs, ");
Console.Write($"Q of hearts, ");
Console.Write($"Q of diamonds");
Console.WriteLine("");
continue;
}
if (i == 13)
{
Console.Write($"K of spades, ");
Console.Write($"K of clubs, ");
Console.Write($"K of hearts, ");
Console.Write($"K of diamonds");
Console.WriteLine("");
continue;
}
Console.Write($"{i} of spades, ");
Console.Write($"{i} of clubs, ");
Console.Write($"{i} of hearts, ");
Console.Write($"{i} of diamonds");
Console.WriteLine("");
}
бихте ли ми казали къде бъркам?