• 2022-05-30
    以下求1*2*3......*20的程序正确的是:
    A: main(){inti,term;i=1;term=0;do{term=term*i;i++;}while(i<=20)printf("t=%d",term);}
    B: main(){inti,term;i=1;term=1;do{term=term*i;i++;}while(i<=20)printf("t=%d",term);}
    C: main(){inti,term;term=1;for(i=1,i<=20,i++){term=term*i;i++;}printf("t=%d",term);}
    D: main(){inti,term;term=1;for(i=1;i<=20;i++){term=term*i;i++;}printf("t=%d",term);}