Попробуйте этот формат: -
SELECT DATE_FORMAT(NOW(),'%d-%b-%Y')
Это будет выглядеть как: -
10-Sep-2014
Надеюсь, это поможет вам.
class Program {
static void Main(string[] args) {
string input = "";
List<List<int>> answers = new List<List<int>>();
int questionsCount = ReadInt32("The number of questions: ");
for (int i = 0; i < questionsCount; i++) {
answers.Add(new List<int>());
}
while (input == "" || input == "y") {
for (int i = 0; i < answers.Count; i++) {
List<int> a = answers[i];
a.Add(ReadInt32($"Question [{i}]: "));
}
input = Read("Continue (y/n)? ").ToLower();
}
WriteLine("End of input!");
for (int i = 0; i < answers.Count; i++) {
List<int> a = answers[i];
Write($"Average for question[{i}]: {a.Average()}\n");
}
ReadKey();
}
static string Read (string a) {
Write(a);
return ReadLine();
}
static int ReadInt32 (string a = "") {
Write(a);
return ToInt32(ReadLine());
}
}
Попробуйте это. Вы можете настроить вопросы. И обратите внимание, что для использования Write()
и WriteLine()
, вы должны добавить
using static System.Console;
вверху, в ссылках проекта.