C语言完美演绎9-12

/* 范例:9-12 */

#include <stdio.h>

#include <string.h>

#include <conio.h>

struct Scoretype

{

char std_no[10]; /* 学号 */

char name[10]; /* 学生姓名 */

int chi_score; /* 语文成绩 */

int eng_score; /* 英文成绩 */

}students[50];

void main(void)

{

printf("输入姓名:");

scanf("%s",students[0].name);

printf("输入中文成绩:");

scanf("%d",&students[0].chi_score);

printf("%s 语文 %d 分\n", \

students[0].name,students[0].chi_score);

strcpy(students[1].name,"Peipei");

students[1].chi_score = 90;

printf("%s 语文 %d 分\n", \

students[1].name,students[1].chi_score);

getche();

}

相关推荐
Navigator_Z3 小时前
LeetCode //C - 1031. Maximum Sum of Two Non-Overlapping Subarrays
c语言·算法·leetcode
leoufung8 小时前
LeetCode 30:Substring with Concatenation of All Words 题解(含 C 语言 uthash 实现)
c语言·leetcode·c#
爱编码的小八嘎8 小时前
C语言完美演绎9-6
c语言
SunnyByte9 小时前
线性表——单链表的增删查改操作
c语言·单链表
SunnyByte10 小时前
线性表——双向链表
c语言·链表
jimy110 小时前
C 语言的 static 关键字作用
c语言·开发语言·算法
handler0110 小时前
算法:图的基本概念
c语言·开发语言·c++·笔记·算法·图论
木木_王11 小时前
嵌入式Linux学习 | 数据结构 (Day03)顺序表与单链表 超详细解析(含 C 语言实现 + 作业 + 避坑指南)
linux·c语言·数据结构·学习
wefg111 小时前
【C语言】用 C 语言实现多态
c语言·开发语言