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.
#include <bits/stdc++.h>
using namespace std;
long long i,s;
int main()
{
s=1;
for (i=5; i<=50; i++) s=s*i;
cout<<s;
return 0;
}
uses crt;
var i,n,t:integer;
begin
clrscr;
write('nhap n='); readln(n);
t:=0;
for i:=1 to n do
if i mod 2=0 then t:=t+i;
writeln(t);
readln;
end.
uses crt;
var i,n,t:integer;
begin
clrscr;
write('nhap n='); readln(n);
t:=0;
for i:=1 to n do
if i mod 2=1 then t:=t+i;
writeln(t);
readln;
end.
câu 1:
uses crt;
var p,i:integer;
begin
clrscr;
p:=1;i:=1;while i<=5 do
begin
p:=p*i;i:=i+1;
end;
write(p);
readln;
end.
bai 2:
uses crt;var p,i:integer;begin clrscr; p:=1; i:=0; while i <=10 do begin
i:=i+1; if (i mod 2<>0) then p:=p*i; end; write(p); readln;end. bai 3:
uses crt;var n,i,p:integer;begin clrscr; write('nhap n: '); readln(n); i:=1; p:=1; while i<=n do begin if i mod 2=0 then p:=p*i; i:=i+1; end; write(p); readln;end.
Tham khảo theo link nhé bạn: https://hoc24.vn/hoi-dap/tim-kiem?id=603125&q=t%C3%ADnh%20t%E1%BB%95ng%20c%C3%A1c%20s%E1%BB%91%20t%E1%BB%B1%20nhi%C3%AAn%20t%E1%BB%AB%20100%20%C4%91%E1%BA%BFn%201000%20%28v%C3%B2ng%20l%E1%BA%B7p%20v%E1%BB%9Bi%20s%E1%BB%91%20l%E1%BA%B7p%20ch%C6%B0a%20bi%E1%BA%BFt%29
1. uses crt;
var a,vt:array[1..100]of integer;
n,i,t,dem:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
repeat
write('A[',i,']='); readln(a[i]);
until a[i]>=0;
end;
t:=0;
for i:=1 to n do
begin
if t<100 then
begin
t:=t+a[i];
dem:=dem+1;
vt[dem]:=i;
end;
end;
writeln(vt[dem]);
readln;
end.
Câu 2:
uses crt;
var a:array[1..30]of integer;
i,n,kt:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
kt:=0;
for i:=1 to n-1 do
if a[i]>=a[j] then kt:=1;
if kt=0 then writeln('Day la day so khong giam')
else writeln('Day khong la day so khong giam');
readln;
end.
Câu 1:
program chieu_cao;
uses crt;
var Nam, Linh: real;
begin
clrscr;
write ('Nhap chieu cao cua Nam:'); readln (Nam);
write ('Nhap chieu cao cua Linh:'); readln (Trang);
if Nam > Linh then writeln ('Ban Nam cao hon');
if Nam < Linh then writeln ('Ban Linh cao hon') else writeln ('Hai ban cao bang nhau');
readln
end.
Câu 2:
program Tich;
var N,i: interger;
P: longint;
begin
write ('N='); readln (N);
P:=1;
for i:=1 to N do P:=P*i;
writeln (N,' ! = ',P);
readln
end.
1x2x3x..x100
uses crt;
var i:integer;
s:real;
begin
clrscr;
s:=1;
for i:=1 to 100 do
s:=s*i;
writeln(s:0:0);
readln;
end.