用C编写请输入考试成绩个数,计算及格人数和不及格人数
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/19 20:05:18
#includevoidfun(doublea[10],intn){inti;doubleave,max,min,sum=0;max=a[0];min=a[0];for(i=0;i
#include"stdio.h"intmain(){\x09inti,j,n;\x09inta[12];\x09intmin,mx;\x09scanf("%d",&n);\x09for(i=0;i
非要限制输入的大小么?过会儿给你发个#include#includevoidmain(){charm_input;intdigit=0,space=0,others=0,uppercase=0,low
再简化一下#include#defineN10voidmain(){inta[N],i,s1=0,s2=0;for(i=0;i
#include <stdio.h>int main() {int plus = 0,negative = 
#includevoidmain(){intsum=0,i,temp;for(i=0;i
#include#includevoidmain(){intw=0,k=0,n=0,z=0;//w为字母个数,k为空格个数,n为数字个数,z为其他字符个数charch;scanf("%c",&ch);
#include"stdio.h"main(){floata[20],avg=0.00;inti;printf("Pleaseinputdatas!\n");for(i=0;i
clearinput"请输入第1个数:"toak=afori=2to4input"请输入第"+alltrim(str(i))+"个数:"tobifabk=bendifendfor"其中最大的数是:",
%首先将这些数储存在向量a中a=input('inputnumber');%输入数据时要加[].例如,[8216]n=length(a);b=zeros(1,100);fori=1:nforj=1:1
#includeintmain(){inta,b,c,min,max;printf("请输入三个数,用空格键隔开");scanf("%d%d%d",&a,&b,&c);min=ac?b:c);prin
#includevoidmain(){inta,b,i,j,t,k=0;printf("请输入两个正整数:");scanf("%d%d",&a,&b);if(a>b){t=a;a=b;b=t;}for
/*Note:YourchoiceisCIDE*/#include"stdio.h"#include"stdlib.h"#include"ctype.h"#include"string.h"#incl
#include <stdio.h>main(){ double grade[200]; double sum,avg,temp;&nbs
#include#defineN20//默认数组大小20intmain(){inta[N],i;doubleave=0;printf("输入20个数\n");for(i=0;i
/*测试环境Ubuntu12.04编译器gcc*/#include#include#includeintfun(int[4]);//判断是否有重复voidjudge(int[4],int[4]);//
#includeintmain(void){intn=0;intnum=0;charch;printf("Endtoinput\'a\'.\n");printf("Pleaseinputnumber:
#include "stdio.h"int main() {int n, sum=0, i=0, max,&
SETTALKOFFCLEARCLOSEALLSTORE0TOl,j,kFORi=1TO20input"pleaseinputanumber:"toaIFa>0l=l+1ELSEIFa=0j=j+1E
就用最简单的EXCEL吧,假设你的数在A列,那么你可以在B1单元格输入="你输入了"&COUNTIF(INDIRECT("A1:A"&MATCH(-1,A:A,0)),ROW())&"个"&ROW()