Advertisement
Jmdnbvs

hola

Sep 21st, 2019
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <string.h>
  4. /*Los datos del estudiante con la nota mas alta de todas las notas.
  5. + El promedio de notas de cada estudiante.
  6. + El promedio de notas de cada materia.
  7. + La nota que mas se repite por cada materia
  8. + porcentaje de aprobados y reprobados para cada materia.*/
  9. using namespace std;
  10.  
  11. struct materias{
  12. char nombre_materia[100];
  13. int nota1,nota2,nota3;
  14.  
  15. }materia[100];
  16.  
  17. struct estudiante{
  18.  
  19. char nombre[100];
  20. char cedula[15];
  21. int fechad,fechaa,fecham;
  22.  
  23.  
  24. }alumno[100];
  25.  
  26. int main(){
  27. int mayort=0,pos_mayor_nota,notat;
  28.  
  29.  
  30.  
  31.  
  32. for(int i=0;i<3;i++){
  33. fflush(stdin);
  34. //Bucle para pedir los datos del estudiante
  35. cout<<"\nIngrese el nombre del estudiante #"<<i+1<<": ";
  36. cin.getline(alumno[i].nombre,30,'\n');
  37. cout<<"\nIngrese la cedula de estudiante: ";
  38. cin.getline(alumno[i].cedula,15,'\n');
  39. cout<<"\nIngrese la fecha de nacimiento(dd/mm/aa): ";
  40. cin>>alumno[i].fechad>>alumno[i].fecham>>alumno[i].fechaa;
  41.  
  42.  
  43. for(int i=0;i<3;i++){
  44. fflush(stdin);
  45. //Blucle para pedir los datos de la materia y las notas
  46. cout<<"Materia; "<<materias<<endl;
  47.  
  48. cout<<"\nIngrese las 3 de esa materia: ";
  49. cin>>materia[i].nota1;
  50. cin>>materia[i].nota2;
  51. cin>>materia[i].nota3;
  52. }
  53.  
  54.  
  55.  
  56. }
  57.  
  58.  
  59.  
  60.  
  61. getch();
  62. return 0;
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement