ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Ejercicios de lenguaje C++


Enviado por   •  21 de Agosto de 2022  •  Trabajos  •  974 Palabras (4 Páginas)  •  57 Visitas

Página 1 de 4

[pic 1]

#include <stdio.h>

int main()

{

        int num;

        float resultado;

        printf("Ingrese el tiempo en horas por favor: ");

        scanf("%d",&num);

        resultado=num*3600;

        printf("%d horas son %f en segundos", num,resultado);

        return 0;

}

[pic 2]

#include <stdio.h>

int main()

{

        float nota1,nota2,nota3,R1;

        printf("Ingrese la primer nota\n");

        scanf("%f",¬a1);

        printf("Ingrese la segunda nota\n");

        scanf("%f",¬a2);

        printf("Ingrese la tercera nota\n");

        scanf("%f",¬a3);

        R1=(nota1+nota2+nota3)/3;

        if (R1>=3.0)

        {

                printf("Gano la materia\n");

        }

        if (R1>=2.5 && R1<3.0)

        {

                printf("Puede habilitar la materia\n");

        }

        if (R1<2.5)

        {

                printf("Perdio la materia\n");

        }

        return 0;

}

[pic 3]

#include <stdio.h>

int main()

{

        float altura,peso,R1;

        printf("Ingrese su peso\n");

        scanf("%f",&peso);

        printf("Ingrese su altura\n");

        scanf("%f",&altura);

        R1=peso/(altura*altura);

        if (R1<18.5)

        {

                printf("Peso bajo");

        }

        if (R1>18.5 && R1<24.9)

        {

                printf("Peso normal");

        }

        if (R1>25 && R1<29.9 )

        {

                printf("Sobre peso");

        }

        if (R1>30)

        {

...

Descargar como (para miembros actualizados)  txt (2.8 Kb)   pdf (285.9 Kb)   docx (278.1 Kb)  
Leer 3 páginas más »
Disponible sólo en Clubensayos.com