-
Lenguaje
Pascal
-
Descripción
Leer las notas de una clase de informática y deducir todas aquellas que son NOTABLES (>= 14 y < 18).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
program NotasNotables;
uses crt;
var nota : real;
var tecla_repetir : char;
begin
repeat
clrscr;
write ('Ingresa el valor de nota: ');
readln (nota);
if (nota>=14) and (nota<18) then
begin
writeln ('Notable');
end;
writeln;
write (#168'Deseas repetir el proceso? (S/N): ');
repeat
tecla_repetir := readkey;
until (tecla_repetir = 's') or (tecla_repetir = 'n') or (tecla_repetir = 'S') or (tecla_repetir = 'N');
until (tecla_repetir <> 's') and (tecla_repetir <> 'S');
end.
uses crt;
var nota : real;
var tecla_repetir : char;
begin
repeat
clrscr;
write ('Ingresa el valor de nota: ');
readln (nota);
if (nota>=14) and (nota<18) then
begin
writeln ('Notable');
end;
writeln;
write (#168'Deseas repetir el proceso? (S/N): ');
repeat
tecla_repetir := readkey;
until (tecla_repetir = 's') or (tecla_repetir = 'n') or (tecla_repetir = 'S') or (tecla_repetir = 'N');
until (tecla_repetir <> 's') and (tecla_repetir <> 'S');
end.