#include <iostream> #include <string> using namespace std; struct CDAccount { double balance; //余额 double rate; //利息 int term; //存期 }; struct Date { int year; int month; int day; }; struct Person { string name; Date birthday; CDAccount account…
(一)结构体类型 1.简介: 例: struct date { int month; int day; int year; }; struct student { int num; char name[20]; char sex; int age; struct date birthday; /*birthday 是 struct date 类型*/ char addr[30]; }student1,student2; (1):结构体可嵌套 (2):与枚举相比结构体内元素为变量,而枚举为常量 (…
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace c编程练习题 { class Program { public struct student //结构体的用法. { public int code; public string…