• Lenguaje

    Pascal

  • Descripción

    Pedirá al usauario la nota recibida en un examen por alumno/a, y deberá mostrar un texto que recoja la nota, de la sigiente forma.
    Nota entre 0 y 2 -> Muy deficiente
    Nota entre 2.1 y 4.9 -> Insuficiente
    Nota entre 5.0 y 6.9 -> Suficiente
    Nota entre 7.0 y 8.9 -> Notable
    Nota mayor de 9 -> Sobresaliente

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
program NotaEnTexto;
uses crt;

var nota : real;
begin
    write ('Ingresa el valor de nota: ');
    readln (nota);
    if (nota>=0) and (nota<2.1) then
        begin
            writeln ('Muy deficiente');
        end;
    if (nota>=2.1) and (nota<5) then
        begin
            writeln ('Insuficiente');
        end;
    if (nota>=5) and (nota<7) then
        begin
            writeln ('Suficiente');
        end;
    if (nota>=7) and (nota<9) then
        begin
            writeln ('Notable');
        end;
    if nota>=9 then
        begin
            writeln ('Sobresaliente');
        end;
    writeln;
    write ('Presiona una tecla para terminar . . . ');
    readkey;
end.