实验六

p201821430033 p201821430033     2022-12-17     588

关键词:

#include <stdio.h> #include <string.h> #include <windows.h> #include <stdlib.h> int average(int a,int b,int c)  int av;  av=(a+b+c)/3;  return av;

int average1(int a,int b,int c,int d,int f)   int av;  av=(a+b+c+d+f)/5;  return av;

int main()           system("color 71");     int a[5][3],i,j;     int b[5];     int c[3];     char user[100];

    printf("\\n\\t\\t\\t欢迎使用xx小学学生成绩统计程序\\n\\n");         system("pause");     system("cls");     printf("请输入用户名:");     gets(user);     printf("\\n读取中...\\n");     Sleep(2000);

    printf("您好,");     puts(user);     printf("\\n现在您的班级有五名学生,每名学生参加三门考试\\n");

    for(i=0;i<5;i++)           printf("\\n请输入学生%d的成绩:(输入每门成绩后按回车)\\n",i+1);         for(j=0;j<3;j++)          scanf("%d",&a[i][j]);           for(i=0;i<5;i++)           b[i]=average(a[i][0],a[i][1],a[i][2]);                 for(j=0;j<3;j++)          c[j]=average1(a[0][j],a[1][j],a[2][j],a[3][j],a[4][j]);    

printf("学生1平均成绩=%d\\n",b[0]);

printf("学生2平均成绩=%d\\n",b[1]);

printf("学生3平均成绩=%d\\n",b[2]);

printf("学生4平均成绩=%d\\n",b[3]);

printf("学生5平均成绩=%d\\n",b[4]);

printf("学科1的平均成绩=%d\\n",c[0]);

printf("学科2的平均成绩=%d\\n",c[1]);

printf("学科3的平均成绩=%d\\n",c[2]);

printf("谢谢使用\\n");    return 0;

技术图片

实验六

任务三:defis_valid(x):ls=[str(i)foriinrange(0,10)]ls.append('X')iflen(x)<18:returnFalseforainrange(len(x)):ifx[a]notinls:returnFal 查看详情

实验六(代码片段)

实验六chip类#include<iostream>usingnamespacestd;classbaseprivate:inta,b;public:base(intx,inty):a(x),b(y)intadd()constreturna+b;;classA:publicbaseprivate:inta,b;public:A(intx,inty):base(x,y),a 查看详情

实验六(代码片段)

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465#include<stdio.h>constintN=5;//定义结构体类型structstudent,并定义STU为其别名typedefstru 查看详情

实验六

#include<stdio.h>#include<string.h>#defineN3typedefstructstudent intid; charname[20]; charsubject[20]; floatperf; floatmid; floatfinal; floattotal; charlevel[10];STU;voidcalc(STU[],int); 查看详情

网络攻防_实验六

               查看详情

实验六201771010101白玛次仁

第五章 继承总结实验六继承定义与使用实验时间2018-9-281.类,超类与子类继承Employee类来定义Manager类格式,关键字extends表示继承。Class新类名(子类(subclass),派生类(derivedclass)或孩子类(chideclass))。extends已有类名(超类... 查看详情

实验六信息搜集

实验六信息搜集实验要求2.实践内容(1)各种搜索技巧的应用(2)DNSIP注册信息的查询(3)基本的扫描技术:主机发现、端口扫描、OS及服务版本探测、具体服务的查点(4)漏洞扫描:会扫,会看报告,会查漏洞说明,会修补... 查看详情

实验六

1合并文件,添加语句#include<iostream>#include<fstream>#include<string>#include<cstdlib>usingnamespacestd;intmain()stringfilename;cout<<"输入打开的文件:";cin>>filename;ofstreamfout 查看详情

实验六

#include<stdio.h>#include<stdlib.h>#include<string.h>#defineN3 //运行程序输入测试时,可以把N改小一些输入测试typedefstructstudent intid; /*学生学号*/ charname[20]; /*学生姓名*/ charsubject[20]; /*考试科目*/ 查看详情

实验六(代码片段)

#实验三fromturtleimport*#绘制正方形#参数size指定边长,rgb指定画笔颜色#如果没有给参数,采用默认值defsquare(size=50,rgb=\'orange\'):pencolor(rgb)foriinrange(4):fd(size)left(90)defmain():setup(800,600)speed(0)foriinrange(10):square(80)le 查看详情

实验六

 心得:在此次实验中,我了解到了函数的具体调用过程,但仍然需要继续练习将函数调用掌握。1.函数的定义 2.函数的调用  3.参数传递  4.函数结果返回 5.函数原型声明 #include<stdio.h>#include<mat... 查看详情

实验六(代码片段)

实验任务1#include<stdio.h>#include<stdlib.h>#include<string.h>#defineN3//运行程序输入测试时,可以把N改小一些输入测试typedefstructstudentintid;/*学生学号*/charname[20];/*学生姓名*/charsubject[20];/*考试科目*/floatperf;/ 查看详情

实验六(代码片段)

实验任务1:#include<stdio.h>#include<stdlib.h>#include<string.h>#defineN3//运行程序输入测试时,可以把N改小一些输入测试typedefstructstudentintid;/*学生学号*/charname[20];/*学生姓名*/charsubject[20];/*考试科目*/floatperf; 查看详情

数据结构-实验六排序

实验六  排序 l 实验目的1、排序的基本概念     1.掌握在数组上进行各种排序的方法和算法。     2.深刻理解各种方法的特点,并能灵活应用。     3.加深对排... 查看详情

实验六(代码片段)

 1.验证性实验#include<iostream>#include<fstream>#include<string>#include<cstdlib>usingnamespacestd;intmain()stringfilename1,filename2,newfilename;cout<<"输入要合并的两个文件名:";ci 查看详情

实验六(代码片段)

fromturtleimport*defsquare(size=50,rbg=\'blue\'):pencolor(rbg)foriinrange(4):fd(size)left(90)setup(800,600)speed(0)foriinrange(10):square()left(36)hideturtle()done()fromturtleimport*setup(800,600)penc 查看详情

实验六

1.1#include<stdio.h>#defineN4intmain()intx[N]=1,9,8,4;inti;int*p;//方式1:通过数组名和下标遍历输出数组元素for(i=0;i<N;++i)printf("%d",x[i]); 查看详情

mooc《linux操作系统编程》学习笔记-实验六(代码片段)

实验六线程同步实验https://www.icourse163.org/learn/UESTC-1003040002?tid=1455108444#/learn/content?type=detail&id=1228729539&cid=1245454470实验六 线程同步实验https://www.icourse163.org/learn/UESTC-1003040002?tid=14 查看详情