用QB编写任意输出三个数显示出最大的数
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 21:14:53
privatesubcommand1_click()dimmaxfori=1to3n=val(inputbox("输入第"&i&"个数"))ifn>maxthenmax=nendifnextprint
dimarray(),iasinteger,jasintegerdimmin_iasinteger,max_jasinteger'用来标注数组中最小值和最大值的下标redimarray(10)=[1,
CLSDIMa(10)FORi=1TO10INPUTa(i)NEXTiFORi=1TO9FORj=i+1TO10IFa(i)NEXTj,iPRINTa(1),a(10)end
swap(int&i,int&j){inttemp;temp=i;i=j;j=temp;}main(){inta,b,cscanf("%d,%d,%d",a,b,c);if(a
staticvoidBubbleSort(inta[]){inttemp=0;for(inti=0;ifor(intj=0;jif(a[j]>a[j+1]){//把这里改成大于,就是升序了temp=a
这三道题都是很基础的入门题·~估计楼主也是新手,下面这三个程序我以最简单易懂的形式,希望对你有用,不过还是建议楼主重在自己动手.#includevoidmain(){doublex,y,z;print
#include <stdio.h> int main (){ int&nbs
a=InputBox("请输入a")b=InputBox("请输入b")c=InputBox("请输入c")Ifat=aa=bb=tEndIfIfat=aa=cc=tEndIfIfbt=bb=cc=t
scanf("%d,%d,%d,&a,&b,&c");改成scanf("%d,%d,%d“,&a,&b,&c);printf("thelargerstnumberis%d\n,max");改成prin
一:#includevoidmain(){inti,j;inta[5][3];for(i=0;i
#includemain(){inti,j,k,n;scanf("%d",&n);if(n
#includevoidmain(void){floatx[3],*p=x;printf("请输入三个数\n");for(inti=0;i
charsNum[8];intnumber=0;intnCount=0;cin>>number;charstring[25];memset(string,0,25);itoa(number,strin
#includevoidsort(int*p,int*q,int*t){inttemp;if(*p>*q){temp=*p;*p=*q;*q=temp;}if(*p>*t){temp=*t;*t=*p
你好.看代码#includevoidsort(int*a,int*b,int*c){intt;t=*a;*a=*a>*b?*a:*b;*b=*a>*b?*b:t;t=*a;*a=*a>*c?*a:*c
#include <iostream>using namespace std;int main(){int a,b,c,t;cin&nbs
QBINPUTA,B,CMAX=AIFMAX
#include#includevoidmain(){inti;charstr[100];scanf("%s",&str);printf("长度为:%d\n逆序输出:",strlen(str));fo
程序目的求三个值的最小值