Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

222-9+11+12:2*14+14 = ? ( )

Toán Lớp 8: viết chương trình xác định của tộc 2 số nguyên nhập vào từ bàn phím là số chẵn hay lẻ giúp em với em đang cần gấp lắm ak

Toán Lớp 8: viết chương trình xác định của tộc 2 số nguyên nhập vào từ bàn phím là số chẵn hay lẻ
giúp em với em đang cần gấp lắm ak

Comments ( 2 )

  1. chẳng hạn cho 1 số bất kì bằng n nha thì sẽ làm được
    var n:integer;
    begin
    write ( ‘nhap gia tri cua n: ‘ );
    readln (n);
    if n mod 2 = 0 then write ( ‘n la so chan’ )
    else write ( ‘n la so le’ );
    end.

  2. a:array[1..100]of integer;
    begin
    write(‘n=’);   readln(n);
    for i:=1 to n do
    begin 
    write(‘a[‘,i,’]:’);
    readln(a[i]);
    end;
    write(‘mang vua nhap la’);
    for i:=1 to n do write ([i]:5);
    writeln;
    s:=0;
    begin
    if a[i]<0 to n do write s:=s+a[i];
    end;
    writeln(‘s=’,s);
    for i:=1 to n do
    if (i mod 2=0) then inc(t);
    for i:=1 to n do
    if (i mod 2=1) then inc(d);
    write(‘cac so chan la’,t,’);
    write(‘cac so le la’,d,’);
    readln;
    end.
    mk Ɩàm được có bài 1 thui ak sr nha
    maianhtu:
    a:array[1..100]of integer;
    begin
    write(‘n=’);   readln(n);
    for i:=1 to n do
    begin 
    write(‘a[‘,i,’]:’);
    readln(a[i]);
    end;
    write(‘mang vua nhap la’);
    for i:=1 to n do write ([i]:5);
    writeln;
    s:=0;
    begin
    if a[i]<0 to n do write s:=s+a[i];
    end;
    writeln(‘s=’,s);
    for i:=1 to n do
    if (i mod 2=0) then inc(t);
    for i:=1 to n do
    if (i mod 2=1) then inc(d);
    write(‘cac so chan la’,t,’);
    write(‘cac so le la’,d,’);
    readln;
    end.
     

Leave a reply

222-9+11+12:2*14+14 = ? ( )