Uses CRT, DOS; VAR AA, MM, DD, DS, HH, MI, SS, CS: WORD
Seminário: Uses CRT, DOS; VAR AA, MM, DD, DS, HH, MI, SS, CS: WORD. Pesquise 862.000+ trabalhos acadêmicosPor: denilmuca • 25/11/2013 • Seminário • 429 Palavras (2 Páginas) • 566 Visualizações
program molduras;
USES CRT,DOS;
VAR
AA,MM,DD,DS,HH,MI,SS,CS:WORD;
C,N:INTEGER;
S:REAL;
CONT:CHAR;
PROCEDURE MOLDURA(CI,LI,CF,LF,COR:INTEGER);
VAR
C,L:INTEGER;
BEGIN
TEXTCOLOR(COR);
FOR C:=CI TO CF DO
BEGIN
GOTOXY(C,LI);WRITE('Í');
GOTOXY(C,LF);WRITE('Í');
END;
FOR L:=LI TO LF DO
BEGIN
GOTOXY(CI,L);WRITE('º');
GOTOXY(CF,L);WRITE('º');
END;
GOTOXY(CI,LI);WRITE('É');GOTOXY(CF,LI);WRITE('»');
GOTOXY(CI,LF);WRITE('È');GOTOXY(CF,LF);WRITE('¼');
END;
BEGIN
REPEAT
BEGIN
TEXTBACKGROUND(0);CLRSCR;
GETDATE(AA,MM,DD,DS);GETTIME(HH,MI,SS,CS);
MOLDURA(1,1,80,3,14);
GOTOXY(5,2);WRITE('DATA: ',DD,'/',MM,'/',AA);
GOTOXY(65,2);WRITE('HORA: ',HH,'H.',MI);
MOLDURA(1,4,80,21,10);
MOLDURA(2,5,79,19,4);
TEXTCOLOR(15);GOTOXY(5,7);WRITE('DIGITE O LIMETE DA SEQUENCIA: ');
READLN(N);
S:=1;
GOTOXY(5,9);WRITE('S = 1/1');
FOR C:=1 TO N DO
BEGIN
IF (C MOD 3 = 0) THEN
BEGIN
S:=S+1/C;
WRITE(' + 1/',C);
END;
END;
GOTOXY(5,11);WRITE('S = ',S:5:2);
MOLDURA(1,22,80,24,12);
GOTOXY(10,23);WRITE('DESEJA MOSTRAR OUTRA SEQUENCIA(S/N) ? [ ]');
GOTOXY(49,23);READLN(CONT);
...