C语言编程:输入一个班若干学生的成绩,统计计算并显示:及格人数,不及格人数,及格
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/11 00:57:23
#include“stdio.h”#defineMAX100voidmain(){intmark[MAX],sum=0,mark=0,j=0,aver=0;printf("请输入学生成绩,输入负数结束
例如:2的3次方#include#includeintmain(intargc,char*argv[]){printf("%f\n",pow(2,3));//第一个参数是底数(double),//第二
#includevoidmain(){intx,a,b,c;scanf("%d",&x);a=x/100;b=x/10%10;c=x%10;x=c*100+b*10+a;printf("%d",x);
#includeintmain(){inta,sum=0;scanf("%d",&a);while(a){sum+=a%10;a/=10;}printf("sum=%d\n",sum);return0
inti=2123;intone,two,three,four;one=i%10;//各位two=(i/10)%10;//十位three=(i/100)%10;//百位four=(i/1000)%10
#includeintmain(){inti;voidfun(inta);printf("输入数字:");scanf("%d",&i);fun(i);return0;}voidfun(inta){if
#include#defineN30typedefstructstudent{\x09charname[10];\x09intscore;}STU;voidmain(){\x09STUs[N];\x0
#include#includeintmain(){printf("请输入一个正整数:");intn1,n2;boolflag1=false,flag2=false;scanf("%d",&n1);n
#includevoidmain(){inti,j,k,m;printf("inputdata:");scanf("%d",&m);/*输入一个3位数*/i=m/100;j=(m-100*i)/10;
#include<stdio.h>void main(){ int sum=0; &nb
给你一个输出来是正的正三角行图案:/*输出一个正的正三角行图形*/#includevoidmain(){inti,j,x,n,count,k,m,q,p,v;scanf(“%d%d”,&n,&x);c
#includevoidmain(){floats=0;intn=0,k=0;//k值用来统计学生的总数while(n>=0&&n
#include <stdio.h>#include <math.h>int main(void){  
#includeintmain(){intn,sum=0;printf("请输入一个整数:");scanf("%d",&n);while(n){sum=sum+n%10;n/=10;}printf("
#includevoidmain(){\x09inti,n;\x09inta[10];\x09ints,p;\x09printf("n:");\x09scanf("%d",&n);\x09for(i=
#includevoidmain(){\x09intyear;\x09printf("请输入年份:");\x09scanf("%d",&year);\x09if((year%4==0&&year/10
voidmain(){inta[100],i,j;intmax,min,aver;\x05charc;\x05i=0;\x05aver=0;\x05printf("请输入N个数\n");\x05do\
#include#definePI3.1415926voidmain(){doubleh,m,hh;intd,f;printf("请输入弧度:");scanf("%lf",&h);hh=h;h/=PI
#include"stdio.h"main(){intx;printf("请输入一个整数");scanf("%d",&x);if(x%2==0)printf("%d是偶数\n",x);elseprin
#includeintmain(intargc,char*argv[]){floatnStudent[10];floatnCourse[3];for(inti=0;i{printf("请输