fork download
  1. #include <iostream>
  2. using namespace std;
  3. int main(void){
  4.  
  5. struct KARDEX{
  6. int alum;
  7. string nom;
  8.  
  9. };
  10.  
  11. KARDEX Califs[1];
  12. int alums;
  13. string nomb;
  14.  
  15. for(int i=0; i<1; i++){
  16. cout<<"Alumno: "<<endl;
  17. cin>>alums;
  18. cout<<"Nombre del alumno: "<<endl;
  19. cin>>nomb;
  20.  
  21. Califs[i].alum=alums;
  22. Califs[i].nom=nomb;
  23. }
  24.  
  25. struct CALSEMMAT{
  26. int sem, cal1, cal2, a;
  27. string mat1, mat2;
  28. };
  29.  
  30. CALSEMMAT Boleta[1];
  31. int sems, calia, calib, mates;
  32. string matea, mateb;
  33.  
  34. for(int i=0; i<1; i++){
  35. cout<<"Semestre del alumno: "<<endl;
  36. cin>>sems;
  37. for(int i=0; i<2; i++){
  38. if(sems==1){
  39. cout<<"Materia Matematicas 1 o Materia Español 2"<<endl;
  40. cin>>mates;
  41. if(mates==1){
  42. cout<<"Ingrese calificacion de Matematicas: "<<endl;
  43. cin>>matea;
  44.  
  45. }
  46. else{
  47. cout<<"Ingrese calificacion de Español: "<<endl;
  48. cin>>mateb;
  49. }
  50.  
  51. }
  52. else{
  53. cout<<"Materia Matematicas 1 o Materia Español 2"<<endl;
  54. cin>>mates;
  55. if(mates==1){
  56. cout<<"Ingrese calificacion de Matematicas: "<<endl;
  57. cin>>matea;
  58.  
  59. }
  60. else{
  61. cout<<"Ingrese calificacion de Español: "<<endl;
  62. cin>>mateb;
  63. }
  64. }
  65. }
  66.  
  67.  
  68. Boleta[i].sem=sems;
  69. Boleta[i].mat1=matea;
  70. Boleta[i].cal1=calia;
  71. Boleta[i].mat2=mateb;
  72. Boleta[i].cal2=calib;
  73.  
  74.  
  75. }
  76.  
  77. for(int i=0; i<1; i++){
  78. cout<<"Alumno numero: "<<Califs[i].alum<<endl;
  79. cout<<"Alumno numero: "<<Califs[i].nom<<endl;
  80. for(int i=0; i<2; i++){
  81. cout<<"Semestre del alumno: "<<Boleta[i].sem<<endl;
  82. cout<<"Primer materia: "<<Boleta[i].mat1<<endl;
  83. cout<<"Calificacion de primer materia: "<<Boleta[i].cal1<<endl;
  84. cout<<"Segunda Materia: "<<Boleta[i].mat2<<endl;
  85. cout<<"Calificacion de segunda materia: "<<Boleta[i].cal2<<endl;
  86. }
  87.  
  88. }
  89.  
  90. }
  91.  
Runtime error #stdin #stdout 0s 4464KB
stdin
Standard input is empty
stdout
Alumno: 
Nombre del alumno: 
Semestre del alumno: 
Materia Matematicas 1 o Materia Español 2
Ingrese calificacion de Español: 
Materia Matematicas 1 o Materia Español 2
Ingrese calificacion de Español: 
Alumno numero: 11127
Alumno numero: 
Semestre del alumno: 1225684544
Primer materia: 
Calificacion de primer materia: 0
Segunda Materia: 
Calificacion de segunda materia: 0
Semestre del alumno: 1225685064
Primer materia: 
Calificacion de primer materia: 32766
Segunda Materia: 
Calificacion de segunda materia: 288993536
Semestre del alumno: -112