Programacion
#include <stdio.h>
#include <math.h>
#include <conio>
main () {
float B, H, A;
printf(“Dame la base: “);
scanf(“%f”, &B);printf(“Dame la altura: “);
scanf(“%f”, &H);
A = (B*H) / 2
printf(“El area es %f”, A);
getch();
} // Fin de main
PROGRAMA QUE CALCULE EL PAGO DE GASOLINA
#include <stdio.h>#include <math.h>
#include <conio>
main () {
float L, C, P;
printf(“Dame la cantidad de litros: “);
scanf(“%f”, &L);
printf(“El costo por litro: “);
scanf(“%f”, &C);
P = L*Cprintf(“El total del pago es %f”, T);
getch ();
} // Fin de main
PROGRAMA QUE CALCULE EL AREA DE UN CIRCULO
#include <stdio.h>
#include <math.h>
#include <conio>
main () {float r, a, pi;
printf(“Dame el radio: “);
scanf(“%f”, &r);
pi = 3.1416
a = pi*pow(r,2)
printf(“El area del circulo es %f”, a);
getch();
} // Fin de main
PROGRAMA QUE CALCULE LAHIPOTENUSA
#include <stdio.h>
#include <math.h>
#include <conio>
main () {
float CA, CO, h;
printf(“Dame el CA: “);
scanf(“%f”, &CA);
printf(“Dame el CO: “);
scanf(“%f”,&CO);
h = sqrt[pow(CA,2)+pow(CO,2)]
printf(“El calculo de la hipotenusa %f”, h);
getch();
} // Fin de main
PROGRAMA QUE LEA 3 CALIFICACIONES E INDIQUE SI ES APROBADO O REPROBADO
#include<stdio.h>
#include <math.h>
#include <conio>
main () {
float C1, C2, C3, prom;
printf(“Dame calificacion 1: “);
scanf(“%f”, &C1);
printf(“Dame calificacion 2: “);
scanf(“%f”,&C2);
printf(“Dame calificacion 3: “);
scanf(“%f”, &C3);
prom = (C1*.30)+(C2*.20)+(C3*.50)
if (prom>=70) {
printf(“Aprobado con %f”, prom);
}
else {
printf(“Reprobado con %f”,prom);
}
getch ();
} // Fin de main
PROGRAMA QUE INDIQUE SI UN NUMERO ENTERO ES PAR O IMPAR
#include <stdio.h>
#include <math.h>
#include <conio>
main () {
float X, A, B;...
Regístrate para leer el documento completo.