首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
自考
编程序输入30个学生的学号、姓名、3门课程的成绩,存入一个结构型的数组。统计并输出每个学生的学号、姓名、总分。
编程序输入30个学生的学号、姓名、3门课程的成绩,存入一个结构型的数组。统计并输出每个学生的学号、姓名、总分。
admin
2016-12-25
24
问题
编程序输入30个学生的学号、姓名、3门课程的成绩,存入一个结构型的数组。统计并输出每个学生的学号、姓名、总分。
选项
答案
main() {struct {10ng num; char name[ 20]; fioat score1; f1oat score2, f1oat score3 ; f1oat total; } stu[50]; int i, f1oat x1,x2,x3 ; for(i=0;i<30;i++ ) { scanf( "% ld,% s",&stu[i].num,stu [ i] ).name) ; stu[i] .score1 = x1,stu [i] .score2 = x2,stu[i] .score3 = x3 ; for(i =0;i< 30;1 ++ ) stu [i] .score1 = stu [ i] .score2 = x2,stu score2 + stu [ i],score3 ; for(i =0;1<30;i++ ) printf( "% ld name% f\n",stu[i] .num, stu[i] .total)
解析
转载请注明原文地址:https://kaotiyun.com/show/ykAx777K
本试题收录于:
高级语言程序设计题库理工类分类
0
高级语言程序设计
理工类
相关试题推荐
设被测试的程序段为:begins1;if(x=1)and(y>3)thenS2;if(x
在一个长度为n的数组中删除第i个元素(1≤i≤n)时,需要向前移动的元素的个数是_______。
已知用数组sq[50]存放循环队列的元素,且头指针和尾指针分别为19和2,则该队列的当前长度为_______。
在UNIX系统中,sprintf是有关文件的标准输入输出函数。()
#includeintf=1;intfac(intn){f=f*n;returnf;}main(){inti;for(i=1;i<=4,i++){print
#include"stdio.h"structdate{intyear=2000;intmonth;intday;};main(){structdated;d.mo
intff(intn){staticintf=1;f=f*n:returnf;}main(){inti;for(i=1;i<=5;i++);
设staticinta[3]={1,2,3};int*p[]={&a[0],&a[1],&a[2]);则与数组元素a[1]等价的是()
随机试题
出皈物消费者的不同层次是指不同的()。
对某区域进行火灾风险评估,划分一级评估指标,包括火灾危险源、城市基础信息、消防力量、火灾预警防控和社会面防控能力。下列不属于消防力量的是()。
银行为存款人开立一般存款账户、临时存款账户和专用存款账户的,应自开户之日起一定期限内书面通知基本存款账户开户银行。这期限为()。
注册税务师有下列情况之一的,由注册税务师管理机构注销其注册税务师资格()。
企业盘盈的固定资产,应通过“待处理财产损溢”科目核算。()
孙膑“增兵减灶”灭庞涓,诸葛亮上演“空城计”。这都体现了信息具有()的特征。
治安管理处罚的适用对象是()。
判定下列级数的敛散性.
下列叙述中,正确的是
A、Shehasn’tfinishedreadingthebook.B、Shewon’tlendherbooktotheman.C、Themandoesn’tneedthebook.D、Themancanuse
最新回复
(
0
)