C语言 由键盘输入20个整数,统计不同数字的个数.
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/18 02:06:28
#include"stdio.h"main(){intA,B,C,min;printf("inputA,B,C:");scanf("%d%d%d",&A,&B,&C);min=A;if(min>B){
#includeintmain(){inta,b,c;printf("请输入三个任意整数:\n");scanf("%d%d%d",&a,&b,&c);if(b>a){a=b;if(aa=c;}else
#includevoidmain(){\x09intn,i,j,t,a[10000];\x09printf("请输入正整数N:");\x09scanf("%d",&n);\x09printf("请依次
#inlcudevoidmain(){inta[6];inti,j,max=0,sum=0;doubleavg=0.0;printf("请输入六个数:\n");for(i=0;imax)max=a[i
你把你的代码带大括号试下.main(){inta,b,c;if(a
#include "stdio.h"int main(){ int count1=0,count2=0,i;&nbs
#includeintmain(){intarr[20];inti,j,num=0,flag;for(i=0;i
选择法排序:#include"stdio.h"#defineN10voidmain(){inti,j,k,a[N],temp;printf("请输入10个数字:\n");for(i=0;i
#includevoidmain(){intn,i,j,k=0;scanf("%d",&n);printf(“这些数中奇数有:\n");for(i=0;i
#include <stdio.h>#include <iostream>using namespace std;int ma
#include"stdio.h"intmain(intargc,char*argv[]){\x09intarr[10];\x09for(inti=0;i
这个就错了inti,j,k,a[10],temp;你要输入20个数据应该是a[20]
#includeintmain(void){intcount=0,n,sum=0;whlie(scanf("%d",&n)!=EOF){if(n==-1)break;elsesum+=n;count+
/*输入10个整数(空格隔开):45677123198762339124677123198762339124最大值是:91,索引是:8最小值是:19,索引是:4最大值和最小值交换位置后:4567712
#include<stdio.h>int main(){\x09int n,i=10,pos=0,neg=0;\x09while(i--)\x09{\x09\x09sc
#includevoidmain(){inta,b,c;intm;printf("Pleaseinputabc\n");scanf("%d%d%d",&a,&b,&c);m=a;if(b>m)m=b;
#include<stdio.h>void main(){ int a[5]={0}; int i,j,t; printf(&q
#include#includeintmain(){\x09inta1,a2,a3,max;\x09scanf("%d",&a1);\x09scanf("%d",&a2);\x09scanf("%d"
#includeintmain(){inta,b,c;printf("Pleaesinput3int:");scanf("%d%d%d",&a,&b,&c);a=(a>=b)?a:b;a=(a>=c)
#includevoidmain(){inta,b,c;printf("输入三个数:");scanf("%d%d%d",&a,&b,&c);if(a>b&&a>c)printf("最大值为:%d",a