【发布时间】:2021-04-28 17:27:59
【问题描述】:
我是编程新手...请有人帮助编写这个程序。
这是我目前写的代码....我知道有很多错误请帮忙。
using System;
using System.Collections.Generic;
using System.IO;
class Solution
{
static void Main(String[] args)
{
int n = Convert.ToInt32(Console.ReadLine());
for (int i = 0; i < n; i++)
{
Dictionary<string, int> phonebook = new Dictionary<string, int>();
foreach (string name in phonenumber)
{
phonebook.Add("name", num);
}
}
}
}
【问题讨论】:
-
int是存储电话号码的一个非常糟糕的选择——因为它们可以以0开头。至于编写程序的帮助:您有什么具体问题?一般来说,仅仅寻求帮助对于 SO 来说太宽泛而且离题了。我推荐taking the tour,以及阅读how to ask a good question 和what's on topic。 -
我以为人们会在这里帮我写程序...对不起
标签: c# dictionary