A.
program Tin_hoc;
uses ccrt;
var i,e,tong,n:integer;
begin
clrscr;
write('Nhap E la so nguyen duong: ');readln(E);
while E<=0 then begin
write('Nhap lai: ');
readln(E)
end;
n:=1;Tong:=0;
while Tong<=E do
begin
Tong:=0;
inc(n);
for i:= 1 to n do Tong:=Tong+i;
end;
writeln('Gia tri nguyen duong nho nhat de thoa man dieu kien tren la :',n);
readln;
end.
B.
program Tin_hoc;
uses crt;
var i,n,x,k:integer;
begin
clrscr;
write('Nhap so nguyen duong n: ');readln(n);
while n<=0 then begin
write('Nhap lai: ');readln(n)
end;
x:=n;k:=1;
while x>9 do
begin
x:=x div 10;
inc(k)
end;
writeln('So ',n,' co ',k,' chu so');
readln;
end.
C.
program Tin_hoc;
uses crt;
var i,n,x,tong,y:integer;
begin
clrscr;
write('Nhap n: ');readln(n);
while n<=0 then begin
write('Nhap lai: ');readln(n)
end;
x:=n;tong:=0;
while x>9 do
begin
x:=x div 10;
y:=x mod 10;
tong;=tong+y
end;
tong:=tong+x;
writeln('Tong cac chu so cua so nguyen duong ',n,' la: ',tong);
readln;
end.
D.
program Tin_hoc;
uses crt;
var i,n:integer;
begin
clrscr;
write('Nhap n: ');readln(n);
while n<=0 then begin
write('Nhap lai: ');readln(n)
end;
i:=1;
while i=(n-1+1) do inc(i);
if i=n then writeln('So ',n,' la so doi xung
realn;
end.
A.
Program FNG;
Uses crt;
Var s,e,i: longint;
Begin
Clrscr;
Write('Nhap e: '); Readln(e);
i:=1;
While s<=e do
Begin
s:=s+i;
inc(i);
End;
Write(S);
Readln
End.
B.
Program FNG;
Uses crt;
Var n,d: longint;
Begin
Clrscr;
Write('Nhap n: '); Readln(n);
d:=0;
While n<>0 do
Begin
n:=n div 10;
inc(d);
End;
Write(d);
Readln
End.
C.
Program FNG;
Uses crt;
Var n,d: longint;
Begin
Clrscr;
Write('Nhap n: '); Readln(n);
d:=0;
While n<>0 do
Begin
d:=d+n mod 10;
n:=n div 10;
End;
Write(d);
Readln
End.
D.
Program FNG;
Uses crt;
Var n,d,k: longint;
Begin
Clrscr;
Write('Nhap n: '); Readln(n);
d:=0; k:=n;
While n<>0 do
Begin
d:=d*10+n mod 10;
n:=n div 10;
End;
If d=k then Write('Doi xung')
Else Write('Khong doi xung');
Readln
End.
E.
Program FNG;
Uses crt;
Var n,i: longint;
Function DX(a: longint): boolean;
Var s,k: longint;
Begin
k:=a; s:=0;
While a<>0 do
Begin
s:=s*10+a mod 10;
a:=a div 10;
End;
If s=k then exit(true);
exit(false);
End;
Begin
Clrscr;
Write('Nhap n: '); Readln(n);
For i:=1 to n do
If DX(i) then Write(i,' ');
Readln
End.
Tin học, tiếng Anh: informatics, tiếng Pháp: informatique, là một ngành khoa học chuyên nghiên cứu quá trình tự động hóa việc tổ chức, lưu trữ, xử lý và truyền dẫn thông tin của một hệ thống máy tính cụ thể hoặc trừu tượng (ảo). Với cách hiểu hiện nay, tin học bao hàm tất cả các nghiên cứu và kỹ thuật có liên quan đến việc mô phỏng, biến đổi và tái tạo thông tin.
Nguồn : Wikipedia - Bách khoa toàn thưLớp 8 - Năm thứ ba ở cấp trung học cơ sở, học tập bắt đầu nặng dần, sang năm lại là năm cuối cấp áp lực lớn dần nhưng các em vẫn phải chú ý sức khỏe nhé!
Nguồn : ADMIN :))Xem thêm tại https://loigiaisgk.com/cau-hoi or https://giaibtsgk.com/cau-hoi
Copyright © 2021 HOCTAPSGK