正在加载图片...
5.下面程序是输出结构数组中所有学生的姓名和成绩。完成程序中下划线部 分 struct studenti char name [20] float score struct student stus [5]=f["Liping",85.5,Zhanghao,90.0 I"Wangmin",75),I"Denglan",95),i" Maming",84.5) main p for(p stus; p++) printf(“号s暑f p->score) 、编程题(10分) 有一段关于c语言的文字,共有3行,每行最多有80个字符,编程统计出这段 文字的大写英文字符、小写英文字符、数字、空格和其它字符的个数并将统计结 果输出。 char text[ tThe programming language c was originally developed by Dennis Ritchie of bell Laboratories and was designed to run on a PDP-11 with a UNIX operating system.)r= ; _________________= r; } 5. 下面程序是输出结构数组中所有学生的姓名和成绩。完成程序中下划线部 分。 struct student{ char name[20]; float score; }; struct student stus[5]={{”Liping”,85.5},{”Zhanghao”,90.0}, {”Wangmin”,75},{”Denglan”,95},{”Maming”,84.5}}; main() { struct student * p; for(p = stus; ; p++) printf(”%s %f\n”, ,p->score) } 三、 编程题(10 分) 有一段关于 c 语言的文字,共有 3 行,每行最多有 80 个字符,编程统计出这段 文字的大写英文字符、小写英文字符、数字、空格和其它字符的个数并将统计结 果输出。 char * text[]= {”The programming language C was originally developed ”, ”by Dennis Ritchie of Bell Laboratories and was designed ”, ”to run on a PDP-11 with a UNIX operating system.”};
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有