输入3个整数,计算并输出它们的平均值.
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/10 20:27:40
#includevoidmain(){inta,b;printf("Inputtwointegers:");scanf("%d%d",&a,&b);printf("和:a+b=%d\n",a+b);p
用什么语言编写再问:c语言
#includeintmain(){\x09inta,b;\x09scanf("%d%d",&a,&b);\x09printf("商为%.2f余数为%d\n",1.0*a/b,a%b);\x09ret
#includemain(){inta,b,c;doubleavg=0.0;scanf("%d%d%d",&a,&b,&c);avg=(a+b+c)/3;printf("%.3f",avg);再问:不
我写了一个c语言的!#includemain(){inti,n,sum=1;scanf("%d",&n);for(i=1;i
print改成printf就可以了标准答案拿去吧除法进行的Int型的除法自己懂得#includeintmain(void){intnum1,num2;intx,y,z,k,j;printf("Ente
#includeusingnamespacestd;intmain(){inta,b;floatc;//平均数应为浮点型,因为结果不一定是整数intn;coutn;if(n==0)break;//判断
{inti,j,k,n;intsum=0;printf("请输入n(3≤n≤20)\\n");scanf("%d",&n);if(n>=3&
#includemain(){inta,b,c,d;printf("请输入第一个整数:");scanf("%d",&a);printf("请输入第二个整数:");scanf("%d",&b);prin
#includeintmain(void){\x09intnum,i,j,k,sum;\x09printf("输入一个三位整数!\n");\x09scanf("%d",&num);\x09i=num%
usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;namespaceCompare_Numbe
Dimi1AsIntegerDimi2AsIntegerDimi3AsIntegeri1=Val(InputBox("请输入第一个整数"))i2=Val(InputBox("请输入第二个整数"))i3
#includevoidmain(){inta[100];inti,min;printf("输入100个数\n");for(i=0;i
楼上写的麻烦了#includeusingnamespacestd;intmain(){inta,b,c;cin>>a>>b>>c;doubleaverage=(a+b+c)/3.0;//是3.0不能是
/*输入3个整数,输出它们的1次幂、2次幂和3次幂*/#include#definep(A)printf("%d\t%d\t%d\n",mypow(A,1),mypow(A,2),mypow(A,3)
importjava.util.Scanner;publicclassTest20010{publicstaticvoidmain(Stringargs[]){\x05intnum1,num2;\x0
#includevoidmain(){inta,b,c,d;printf("Pleaseinput3numbers,example,[1,2,3]:\n");scanf("%d,%d,%d",&a,&
inti,geshu=0,sum=0,a[100],aver;scanf("%d",&a[i]);for(i=0;i
#include#include#includeintmain(void){intn=0,sum=0;int*nums;printf("请输入整数个数:\n");scanf("%d",&n);nums