Trang chủ Tin Học Lớp 11 uses CRT, Graph, SysUtils, DOS, Math; type TOrientation = (oPortrait,...

uses CRT, Graph, SysUtils, DOS, Math; type TOrientation = (oPortrait, oLandscape); TPoint = record x, y : integer; end; TAngle = record a

Câu hỏi :

uses CRT, Graph, SysUtils, DOS, Math; type TOrientation = (oPortrait, oLandscape); TPoint = record x, y : integer; end; TAngle = record a : float; r : integer; end; var o : TOrientation; c : TPoint; a : TAngle; function color(r, g, b : byte) : integer; var cs : android_graphics_Color; c : integer; begin c := cs.rgb(r, g, b); color := c; end; function point(c : TPoint; a : TAngle) : TPoint; var r : TPoint; begin r.x := round(c.x + a.r * sin(degToRad(a.a))); r.y := round(c.y + a.r * cos(degToRad(a.a))); point := r; end; function hand(c : TPoint; a : TAngle) : TPoint; var p : TPoint; begin a.a := -a.a - 180; p := point(c, a); hand := p; end; procedure drawText; var t : string = 'la gi vay moi nguoi'; h, n, s, z, w : Word; j, m, d, e : string; yr, mo, dy, wd : Word; begin setTextStyle(defaultFont, horizDir, 3); setTextJustify(leftText, topText); setColor(15); w := textWidth(t) div 2; if o = oPortrait then outTextXY(c.x - w, c.y - a.r - 50, t) else outTextXY(c.x - a.r - w * 2 - 50, c.y, t); getTime(h, n, s, z); j := intToStr(h); if length(j) = 1 then j := '0' + j; m := intToStr(n); if length(m) = 1 then m := '0' + m; d := intToStr(s); if length(d) = 1 then d := '0' + d; e := intToStr(z); if length(e) = 1 then e := '0' + e; t := j + ':' + m + ':' + d + '.' + e; w := textWidth(t) div 2; if o = oPortrait then outTextXY(c.x - w, c.y + a.r + 80, t) else outTextXY(c.x + a.r + 50, c.y, t); getDate(yr, mo, dy, wd); end; procedure handHour(h, n : integer); var p : TPoint; r : TAngle; begin if h > 11 then h := h - 12; r := a; r.a := (h + n / 60) * 30; r.r := r.r div 2 - 12; p := hand(c, r); // hand setColor(lightBlue); setLineStyle(solidLn, 0, 24); setFillStyle(solidFill, lightBlue); line(c.x, c.y, p.x, p.y); // rounded tip setLineStyle(solidLn, 0, 1); //pieSlice(p.x,p.y,0,360,11); end; procedure handMinute(n, s : integer); var p : TPoint; r : TAngle; begin r := a; r.a := (n + (s / 60)) * 6; r.r := r.r - 50; p := hand(c, r); // hand setColor(lightGreen); setLineStyle(solidLn, 0, 12); setFillStyle(solidFill, lightGreen); line(c.x, c.y, p.x, p.y); setLineStyle(solidLn, 0, 1); end; procedure handSecond(s, z : integer); var p : TPoint; r : TAngle; begin r := a; r.a := (s + (z / 100)) * 6; setColor(red); setFillStyle(solidFill, red); r.r := a.r - 20; p := hand(c, r); setLin hãy cho biết code viết về cái gì

Bạn có biết?

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ư

Tâm sự 11

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 :))

Copyright © 2021 HOCTAP247