Mostrar el promedio de aprobados o desaprobados - PSeInt.Site
DESARROLLAMOS TUS ALGORITMOS (+51) 988411115
01. Hacer un programa para calcular el promedio de 3 notas; si el promedio es mayor que 10.5 mostrar aprobado de lo contrario mostrar desaprobado.
¿EN QUE PROGRAMA QUIERES VER EL CÓDIGO? :
Curso de autocad, google colaboratory, curso de C, certificacion google, curso marketing digital, cisco python, páginas Web.
ANÁLISIS :
Para obtener el promedio se suman las notas y se divide entre la cantidad de notas; en nuestro caso nuestra evaluación es de 0 a 20; dónde de 0 a 10 es desaprobado y 11 a 20 es aprobado; por lo tanto, si la nota es mayor que 10 mostrará el mensaje de aprobado caso contrario desaprobado.
Diagrama de flujo(DFD) para calcular el promedio de 3 notas:
PSEINT FLEXIBLE : DESCARGA CÓDIGO
Algoritmo Condicional01 Escribir "Ingrese Nota 01 : " Leer N1 Escribir "Ingrese Nota 02 : " Leer N2 Escribir "Ingrese Nota 03 : " Leer N3 Prom = (N1+N2+N3)/3 Si Prom > 10.5 Entonces Escribir "APROBADO : ", Prom SiNo Escribir "DESAPROBADO : ", Prom Fin SiFinAlgoritmo PSEINT ESTRICTO : DESCARGA CÓDIGO
Algoritmo Condicional01 Definir N1, N2, N3 como Entero; Definir Prom como Real; Escribir "Ingrese Nota 01 : "; Leer N1; Escribir "Ingrese Nota 02 : "; Leer N2; Escribir "Ingrese Nota 03 : "; Leer N3; Prom 10.5 Entonces Escribir "APROBADO : ", Prom; SiNo Escribir "DESAPROBADO : ", Prom; FinSiFinAlgoritmo Lenguaje C DESCARGA CÓDIGO
#includeint main() { float n1, n2, n3, prom; printf("Ingrese Nota 01 : "); scanf("%f",&n1); printf("Ingrese Nota 02 : "); scanf("%f",&n2); printf("Ingrese Nota 03 : "); scanf("%f",&n3); prom = (n1+n2+n3)/3; if (prom>10.5) { printf("APROBADO : %.2f\n",prom); } else { printf("DESAPROBADO : %.2f\n",prom); } return 0;} C++ DESCARGA CÓDIGO
#includeusing namespace std;int main() { float n1, n2, n3, prom; cout > n1; cout > n2; cout > n3; prom = (n1+n2+n3)/3; if (prom>10.5) { cout INGRESE NOTA 02 :
INGRESE NOTA 03 :
RESULTADO :
Visual Basic .Net - Consola DESCARGA CÓDIGO
Imports System.ConsoleModule Module1Dim Prom, N1, N2, N3 As DecimalSub Main() Write("Ingrese Nota 1 : ") N1 = ReadLine() Write("Ingrese Nota 2 : ") N2 = ReadLine() Write("Ingrese Nota 3 : ") N3 = ReadLine() Prom = (N1 + N2 + N3) / 3 If (Prom > 10.5) Then WriteLine("APROBADO : " & Prom) Else WriteLine("DESAPROBADO : " & Prom) End If ReadLine()End SubEnd Module
Derechos de autor
Si cree que algún contenido infringe derechos de autor o propiedad intelectual, contacte en [email protected].
Copyright notice
If you believe any content infringes copyright or intellectual property rights, please contact [email protected].
Si cree que algún contenido infringe derechos de autor o propiedad intelectual, contacte en [email protected].
Copyright notice
If you believe any content infringes copyright or intellectual property rights, please contact [email protected].