编写一个程序计算s=a aa aaa - aa-a的值其中a∈N*且a≤9
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/11 10:43:26
inta,n;doublesum=0;scanf("%d%d",&a,&n);for(sum=a,i=2;i
s=0k=1whilei
PrivateSubCommand1_Click()Dima,xAsSinglea=Val(Text1.Text)Ifa再问:x=x+a*0.2+3000*0.2怎么都乘0.2呀?
VB程序PrivateSubCommand1_Click()Dima,iAsIntegeri=1Whilei<50s=s+(i+1)/ii=i+1WendPrint"s=";sEndSu
用你那个问题的格式:reada,nt←as←0forifrom1tons←s+tt←t*10+aendforprintsend
LZ不给分加一下最佳总可以吧?注意是BASIC不是BUSICinputa,ni=1s=0dos=s+aa=a+a*10^ii=i+1whilei
n!=n*(n-1)*(n-2)*...*2*1的意思就是n!等于前n个正整数相乘.不是楼主所说的3!=3*(3-1)*(3-2)*(3-3)*3*2*1.3!=3*2*1(其实就是1*2*3=3!)
#includevoidmain(){doubler,s,l;printf("请输入圆的半径\n");scanf("%lf",&r);s=3.14159*r*r;l=2*3.14159*r;print
inti,S=0;for(i=1;i
#include <stdio.h>int main(){ float x, tax = 0;
我用php语言写的.分两个步骤,一个是计算每个节点的值,用递归算法.一个是节点的累加,用循环算法.这么好的答案,不给分,没良心.再问:谢谢了,我没说清楚,我现在学的是c++语言,真的很感谢
希望能帮到你.#include"stdio.h"intmain(){inti,j,n,s,temp;printf("请输入n的值:");scanf("%d",&n);for(i=1;i
publicclassTest{publicstaticvoidmain(String[]args){ints=0;intn=1;for(inti=0;i
#includeusingnamespacestd;voidmain(){intn,t=0;longsum=0;cin>>n;for(inti=1;i
用什么语言啊?如果是java的话就如下:ints=0;for(inti=1;i
;MOVAX,AANDAX,B;AX=aANDbMOVBX,AXORBX,B;BX=aXORbADDAX,BXADDAX,BX;AX=2*(aXORb)+aANDbADDAX,A;AX=a+2*(aX
CLEARSETTALKOffs1=0forn=1to10s1=s1+jc(n)next"1!+2!+3!+.+10!=",s1FUNCTIONjcPARAMETERSis=1FORj=1TOis=s
#include"stdio.h"longf1(longa,longn){if(n==1)returna;elsereturn(10*f1(a,n-1)+a);}longf2(intn){longr=
#includeintmain(){inti,s=0;for(i=1;i