-
Lenguaje
Pascal
-
Descripción
Pida al usuario la nota de teoría y de prácticas de un alumno y muestre por pantalla la nota final y la calificación, teniendo en cuenta que: La nota final corresponde al 60% de la nota de teoría y el 40% de la nota de prácticas. La calificación podrá ser:
a. Sobresaliente, que es 9 o más.
b. Notable, que va desde 7 hasta 9.
c. Aprobado, que es mayor a 5 y menor a 7.
d. Suspenso, cuando sea menor a 5.
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
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 NotaDeTeoriaYDePracticas;
uses crt;
var nota_de_practicas, nota_de_teoria, nota_final : real;
begin
write ('Ingresa el valor de nota de practicas: ');
readln (nota_de_practicas);
write ('Ingresa el valor de nota de teoria: ');
readln (nota_de_teoria);
nota_final := nota_de_teoria*0.6+nota_de_practicas*0.4;
if nota_final>=9 then
begin
writeln ('Sobresaliente');
end;
if (nota_final>=7) and (nota_final<9) then
begin
writeln ('Notable');
end;
if (nota_final>=5) and (nota_final<7) then
begin
writeln ('Aprobado');
end;
if nota_final<5 then
begin
writeln ('Suspenso');
end;
writeln ('Valor de nota final: ', nota_final:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.
uses crt;
var nota_de_practicas, nota_de_teoria, nota_final : real;
begin
write ('Ingresa el valor de nota de practicas: ');
readln (nota_de_practicas);
write ('Ingresa el valor de nota de teoria: ');
readln (nota_de_teoria);
nota_final := nota_de_teoria*0.6+nota_de_practicas*0.4;
if nota_final>=9 then
begin
writeln ('Sobresaliente');
end;
if (nota_final>=7) and (nota_final<9) then
begin
writeln ('Notable');
end;
if (nota_final>=5) and (nota_final<7) then
begin
writeln ('Aprobado');
end;
if nota_final<5 then
begin
writeln ('Suspenso');
end;
writeln ('Valor de nota final: ', nota_final:0:6);
writeln;
write ('Presiona una tecla para terminar . . . ');
readkey;
end.