gpt4 book ai didi

c# - 结构数组示例

转载 作者:太空狗 更新时间:2023-10-30 00:10:51 25 4
gpt4 key购买 nike

<分区>

我对 C# 中的结构有点陌生..

我的问题是:

Write a console application that receives the following information for a set of students: studentid, studentname, coursename, date-of-birth.. The application should also be able to display the information being entered.. Implement this using structs..

我已经走到这一步了-->

struct student
{
public int s_id;
public String s_name, c_name, dob;
}
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Please enter StudentId, StudentName, CourseName, Date-Of-Birth");
s_id = Console.ReadLine();
s_name = Console.ReadLine();
c_name = Console.ReadLine();
s_dob = Console.ReadLine();
student[] arr = new student[4];
}
}

在此之后请帮助我..

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com