... thí tính và
đưa ra nghiệm, ngược lại
thông báo phương trỡnh voõ
nghieọm.
Đ9. CAUTRUCRE NHANH
1. Khaựi nieọm re nhánh
Ví dụ: Để viết chương trình giải phương
trình bậc hai, ta phải:
Tính ... 2 Giáo án tin học lớp 11
CHƯƠNG III
CẤU TRÚCRẼNHÁNHVÀ LẶP
Tuần : . . . Tieỏt : 11
Đ9. CAUTRUCRE NHANH
I. Muùc tiêu
1. Về kiến thức :
- Hiểu nhu cầu của cấutrúcrẽnhánh trong biểu diễn ... Các hệ số a,b,c nhập từ bàn
phím.
program vidu1;
Uses crt;
var a,b,c,d,x1,x2:real;
begin
clrscr;
write('Nhap a,b,c:’);readln(a,b,c);
d:=b*b−4*a*c;
If d<0 then writeln(‘Pt vo Nghiem’)
...
... GOC }
Procedure DD(m:node;VAR q: integer; Var A: mang;T:Tree);
Var k: node;j:integer;
Begin
k:=T.parent[m];
j:=0;
while k<>parent_T(Root(T),T) do
begin
a[j]:=k;
k:=T.parent[k];
j:=j+1;
... and (retrieve(T,L1)<retrieve(Q,L2)) do
T:=T^.next;
insert_L(retrieve(Q,L2),T,P);
Q:=Q^.next;
end;
End;
{ TRON N DANH SACH }
Procedure Merger_nl(N_List:mang; m: integer; Var L:List);
Var ... SỐ NHỊ PHÂN
Type
b=0 1;
Position=^Cell;
Cell=Record
bit:0 1;
next:Position;
end;
Procedure INCREMENT(Var Bnumber: Position; Q: Position);
Var K,P: position;
Begin
P:=Bnumber;
while P^.next<>Q...
... ra
hàng tháng)
Program TienTietKiem;
Var s,n:real;
Begin
Write( ‘Nhap s:’); readln(s);
For n:=1 to 12 do
S := S + 0.015*S;
Write( Tong tien là,S);
readln
End.
Thuật toán
B1: Nhập S, N 0 ... chương trình sau thực hiện
công việc gì ?
Var max, a,b:integer ;
Begin write( Nhap a,b ‘);
readln(a,b) ; max:=b;
if a>b then max:=a;
write(max); readln;
End.
If a > b then
write(‘ ...
và đưa ra màn hình số nguyên dương nhỏ
nhất thoả mÃn điều kiện:
=
<
N
1i
i
1
A
Write(a); readln(a);
S:=0; n:=0;
While s <= a do begin
n:=n+1; s:=s+1/n;
end;
writeln(n);
...
... called”
She said ___________________________________________________________
Reported Requests and Orders
Change the direct speech into reported speech:
1. “Please help me carry this”
She asked me ______________________________________________________
2. ... Reported Statements
Change this direct speech into reported speech:
1. “He works in a bank”
She said ___________________________________________________________
2. ... ___________________________________________________________
14. “I visited my parents at the weekend”
She told me ________________________________________________________
15. “She hasn’t eaten sushi before”
She said ___________________________________________________________
16....
... ;
Begin
Write(‘Nhap vao gia tri N:’) ;
Readln(N) ;
S := 0 ;
For I := 1 to N do
S := S + I ;
Writeln(‘ Tong S =’ , S ) ;
Readln ;
End.
Write(‘Nhap vao gia tri a :’) ;
Readn(a) ;
S := 1/a ... ;
Writeln(‘ Tong S la : ‘, S :8:2) ;
Readln ;
End.
Program Tong_1b ;
Uses crt ;
Var S : real ;
a,N : integer ;
Begin
Write(‘Nhap vao gia tri a :’) ;
Readn(a) ;
S := 1/a ;
For N := 100 ... vi từ M ñeán N.
Program Vi_du 2 ;
Uses crt ;
Var M, N, I : integer ;
T : longint ;
Begin
Write(‘Nhap vao 2 gia tri M va N
(M < N) :’) ;
Readn(M,N) ;
T := 0 ;
For I := M to N do
If...
...
22-“Is there a phone?”
I asked her
23-“Do you have a car?”
She asked me
24-“Can I move the furniture around?”
I asked her
25-“Are there many students?”
I asked her
26. ‘Where are you studying?’, ... )
56. ‘It took me three hours to get here because the roads were very muddy and slippery.’ (He told
me )
57. ‘I think it’s a crazy idea. It won’t work.’ (She said )
58. ‘Breakfast is served between ... ………………………………………………………………………………………………
30. Phong said “My parents are very proud of my good marks.”
………………………… ………………………………………………………………………………………………
31. My teacher said to me “You should read these books.”
………………………… ………………………………………………………………………………………………
...