K
Khách

Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.

8 tháng 5

Hỏng bàn phím đó bà nội

When flag clicked
    Set [a] to (ask [Enter the value of a] and wait)
    Set [b] to (ask [Enter the value of b] and wait)
    Set [product] to ((a) * (b))
    Say (join (join [The product of ] (a)) [ and ] (b)) for (2) secs
    Say (join (join [is ] (product))) for (2) secs

28 tháng 4 2017

Đáp án A

11 tháng 4 2023

Cách 1 dùng lệnh for do:

Uses crt;

var i,n,k: integer;

begin clrcsr;

readln(n);

for i:=1 to n do begin

if(i mod 2=0) and (i>=10) then k:=k*i;

end;

writeln(k);

readln;

end.

Cách 2 dùng lệnh while do

Uses crt;

var m,n,o: integer;

begin clrcsr;

readln(n);

o:=1;

m:=1;

while (m<n) do begin

m:=m+1;

if(m mod 2=0) and (m>=10) then o:=o*m;

end;

writeln(o);

readln;

end.

27 tháng 2 2023

Var i,n,p:longint;

Begin

Write('Nhap n = ');readln(n);

i:=1;

p:=1;

While i<=n do

Begin

i:=i+1;

p:=p*i;

End;

Write('Tich la ',p);

Readln;

End.

#include <bits/stdc++.h>

using namespace std;

long long n,i,t;

int main()

{

cin>>n;

t=0;

for (i=1; i<=n; i++)

if (i%2==0) t+=i;

cout<<t;

return 0;

}

 

 

#include <bits/stdc++.h>

using namespace std;

long long n,i,t;

int main()

{

cin>>n;

t=0;

for (i=1; i<=n; i++)

if (i%2!=0) t+=i;

cout<<t;

return 0;

}

 

#include <bits/stdc++.h>

using namespace std;

int main()

{

int n,t=0,i,dem=0;

cin>>n;

for (int i=1; i<=n; i++)

if (i%2==0)

{

t=t+i;

dem++;

}

cout<<fixed<<setprecision(2)<<(t*1.0)/(dem*1.0);

return 0;

}

uses crt;

var a:array[1..100]of integer;

i,n,t:integer;

begin

clrscr;

write('nhap n='); readln(n);

for i:=1 to n do 

  begin

write('A[',i,']='); readln(a[i]);

end;

t:=0;

i:=1;

while i<=n do 
  begin

t:=t+a[i];

inc(i);

end;

writeln(t/n:4:2);

readln;

end.

29 tháng 3 2022

var i,n,s:integer;

begin

write('nhap n = ');readln(n);

i:=1;

while i<=n do

begin

s:=s+i;

i:=i+1;

end;

write('Tong la ',s);

readln;

end.