Docsity

C Programming: Calculating Averages, Tabulating Products, and Scholarship Eligibility, Assignments of Spanish

Toggle sidebar
bg1
PROMEDIO
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
int main()
{
float C1, C2, C3, P;
system("cls");
printf("Teclee El Primer Numero: ");
scanf("%f", &C1);
printf("Teclee El Segundo Numero: ");
scanf("%f", &C2);
printf("Teclee El Tercero Numero: ");
scanf("%f", &C3);
P = (C1, C2, C3) / 3;
printf("El Promedio Es: %f", P);
getch();
return 0;
}
pf3
pf4
pf5
pf8

Partial preview of the text

Download C Programming: Calculating Averages, Tabulating Products, and Scholarship Eligibility and more Assignments Spanish in PDF only on Docsity!

PROMEDIO

#include <stdio.h> #include <stdlib.h> #include <conio.h> int main() { float C1, C2, C3, P; system("cls"); printf("Teclee El Primer Numero: "); scanf("%f", &C1); printf("Teclee El Segundo Numero: "); scanf("%f", &C2); printf("Teclee El Tercero Numero: "); scanf("%f", &C3); P = (C1, C2, C3) / 3; printf("El Promedio Es: %f", P); getch(); return 0; }

TABLAS

int E, P, I; printf("Ingresa Edad: "); scanf("%d", &E); printf("Ingreso Promedio: "); scanf("%d", &P); printf("Ingresos Mensuales Digitalos: "); scanf("%d", &I); if (E >= 19 || E <= 25 && I >= 2000 && P >= 90) { printf("Beca Aprovada"); } else { printf("Beca Denegada"); } getch(); }

ACUMULACION

#include <stdio.h> #include <conio.h> #include int main() { float valor1, valor2, valor3, valor4, valor5, suma, r; printf("introduzca un valor: "); scanf("%f", &valor1); printf("introduzca un segundo valor: "); scanf("%f", &valor2); printf("introduzca un tercer valor: "); scanf("%f", &valor3); printf("introduzca un cuarto valor: "); scanf("%f", &valor4); printf("introduzca un quinto valor: "); scanf("%f", &valor5);

float NOTAS[5], suma=0, APROBADOS,REPROBADOS, SUMA=0; cout<<"introduce las calificaciones de los alumnos: "<<endl; for(int i=0; i<5; i++) { cin>>NOTAS[i]; if(NOTAS[i]>=6) { APROBADOS=1; suma+=APROBADOS; } else{ REPROBADOS=1; SUMA+=REPROBADOS; } } cout<<"los aprobados son"<<endl; cout<<suma<<endl; cout<<"los reprobados son"<<endl; cout<<SUMA<<endl; system("PAUSE"); return EXIT_SUCCESS; }