Để tính tổng S = 2 +4+6+-.+n; em chọn đoạn lệnh : A . For i:=1 to n do If ( i mod 2 )=0 then S:=S B. For i:=1 to n do If ( i mod 2 )=1 then S:

Để tính tổng S = 2 +4+6+…..+n; em chọn đoạn lệnh :
A . For i:=1 to n do If ( i mod 2 )=0 then S:=S B. For i:=1 to n do If ( i mod 2 )=1 then S:=S+i;
C. For i:=1 to n do S:=S+i; D. For i:=1 to n do If ( i mod 2 ) <> 0 then S:=S +i;

0 bình luận về “Để tính tổng S = 2 +4+6+-.+n; em chọn đoạn lệnh : A . For i:=1 to n do If ( i mod 2 )=0 then S:=S B. For i:=1 to n do If ( i mod 2 )=1 then S:”

  1. Để tính tổng S = 2 +4+6+…..+n; em chọn đoạn lệnh :

    A . For i:=1 to n do If ( i mod 2 )=0 then S:=S+i;

    B. For i:=1 to n do If ( i mod 2 )=1 then S:=S+i;

    C. For i:=1 to n do S:=S+i;

    D. For i:=1 to n do If ( i mod 2 ) <> 0 then S:=S +i;

    Bình luận

Viết một bình luận