Câu 1:
Program Prime;
Uses crt;
Var A: array[1..10000] of longint;
n,i,res: longint;
Function is_Prime(a: longint): boolean;
Var i: longint;
Begin
If a<2 then exit(false);
For i:=2 to trunc(sqrt(a)) do
If a mod i = 0 then exit(false);
Exit(true);
End;
Begin
Read(n);
res:=0;
For i:=1 to n do
Begin
Read(A[i]);
If is_Prime(A[i]) then inc(res);
End;
Write(res);
Readln
End.
Câu 2:
Program Str;
Uses crt;
Var res: array['A'..'Z'] of longint;
St: String;
count,i: longint;
ch: char;
Begin
Clrscr;
Readln(St);
For ch:='A' to 'Z' do res[ch]:=0;
For i:=1 to length(St) do St[i]:=Upcase(St[i]);
For i:=1 to length(St) do
inc(res[St[i]]);
For ch:='A' to 'Z' do
If res[ch]<>0 then inc(count);
Writeln(count);
For ch:='A' to 'Z' do
If res[ch]<>0 then Writeln(ch,' ',res[ch]);
Readln
End.
uses crt;
var i,n,d:word;
a:array[1..10000] of longint;
function nt(n:longint):boolean;
var i:longword;
begin
if n<2 then exit(false);
for i:=2 to trunc(sqrt(n)) do
if n mod i=0 then exit(false);
exit(true);
end;
begin
clrscr;
readln(n);
for i:=1 to n do
begin
read(a[i]);
if nt(a[i])=true then inc(d);
end;
writeln(d);
readln;readln;
end.
=========================
uses crt;
var st:string;
dem:array['A'..'Z'] of byte;
i,d:byte;
c:char;
begin
clrscr;
readln(st);
st:=upcase(st);
for i:=1 to length(st) do inc(dem[st[i]]);
for c:='A' to 'Z' do
if dem[c]>0 then
begin
writeln(c,':',dem[c]);
inc(d);
end;
writeln('Co ',d,' chu cai khac nhau');
readln;
end.
===========================
uses crt;
var t:byte;
n:word;
begin
clrscr;
write('Thang: ');readln(t);
write('Nam: ');readln(n);
write('Co ');
if t=2 then
begin
if (n mod 400=0) or ((n mod 4=0) and (n mod 100<>0)) then
write('29')
else write('28');
end
else
begin
case t of
1,3,5,7,8,10,12:write('31');
4,6,9,11:write('30');
end;
end;
write(' ngay');
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 11 - Năm thứ hai ở cấp trung học phổ thông, gần đến năm cuối cấp nên học tập là nhiệm vụ quan trọng nhất. Nghe nhiều đến định hướng sau này rồi học đại học. Ôi nhiều lúc thật là sợ, hoang mang nhưng các em hãy tự tin và tìm dần điều mà mình muốn là trong tương lai nhé!
Nguồn : ADMIN :))Xem thêm tại https://loigiaisgk.com/cau-hoi or https://giaibtsgk.com/cau-hoi
Copyright © 2021 HOCTAPSGK