
lo necesito si no reprobare D:
Publicado por bob (8 intervenciones) el 19/02/2014 01:09:57
necesito crear una boleta en pascal mas o menos haci es el cuerpo del programa ayudenme a completarlo tiene que hacer mas o menos al correrlo como un menu donde ingreses datos, que encuentre el curp,etc.
program laescuela; uses crt; type materias= (esp,mat,his,cie,fce,art,tec,ori,dep); datos = record escuela:string; cveCentroT:string; nombre:string; apePatA:string; apeMatA:string; curp:string; grupo:string; turno:string; end; calificacion = record asignatura:materias; periodo:integer; inasistencias:integer; grado:integer; curp:string; end; alumnos=Array [1..100] of datos; boletas=array [1..10] of calificacion; procedure capturalumno (var a:alumnos; var total:integer); var curp:string; curp1:string; i:integer; band:boolean; op:char; totalu:integer; begin repeat clrscr; if total=0 then begin totalu:=totalu+1; write ('curp:');readln (a[totalu].curp); write ('nombre');readln (a[totalu].nombre); write ('escuela');readln (a[totalu].escuela); write ('cveCentroT');readln (a[totalu].cveCentroT); write ('apePatA');readln (a[totalu].apePatA); write ('apeMatA');readln (a[totalu].apeMatA); write ('grupo');readln (a[totalu].grupo); write ('turno');readln (a[totalu].turno); if band:=false Then Totalu:=totalu+1; A [totalu].curp:=curp1; Write ('nombre:'), readln (a[total].nombre); Else Writeln('el alumno ya existe'); Write ('desea ingresar otro alumno [s/n]; readln (o)'); Until (op='N') or (op='n'); End; Procedure listar_alumnos (a:alumnos; totalu:integer); Var I:integer; Begin For i:=1 to totalu do Writeln (a[i].curp,' ',a[i].nombre,' ', a[i].ap pat,' ', a[i].ap mat,' ', a[i].escuela, ' ', a[i].cveCentroT, ' ', a[i].grupo, ' ', a[i].turno, ' ',); Readln; End; Procedure leercalif (a:alumno; totalu:integer; var b:boletas;var totbol:integer); Var Band:Boolean; Mater:materias; X,i:integer Curp1:string; Op:integer; Begin If totalu=0 then Begin Write ('no hay alumnos escritos press any key to continue'); Readln; End Else Begin Write ('curp'); readln (curp1); Band:= false; For i:= to totalu do If a[i]. curp =curp1 Then Begin Band:=true; X:=i; End; If band:= true Then Totalu:=totalu+1 B [totalu].curp1; For i:= 1 to totalbol do If (b[i].curp=curp1) and (b[i].asignatura=mater) Band=true If band=true then Write ('ya registraste esta materia.. press..'); Write ('quieres ingresas otra asignatura [s/n:'); Readln (op1) Until (op1='N') or (op1 = 'n') End;
program laescuela; uses crt; type materias= (esp,mat,his,cie,fce,art,tec,ori,dep); datos = record escuela:string; cveCentroT:string; nombre:string; apePatA:string; apeMatA:string; curp:string; grupo:string; turno:string; end; calificacion = record asignatura:materias; periodo:integer; inasistencias:integer; grado:integer; curp:string; end; alumnos=Array [1..100] of datos; boletas=array [1..10] of calificacion; procedure capturalumno (var a:alumnos; var total:integer); var curp:string; curp1:string; i:integer; band:boolean; op:char; totalu:integer; begin repeat clrscr; if total=0 then begin totalu:=totalu+1; write ('curp:');readln (a[totalu].curp); write ('nombre');readln (a[totalu].nombre); write ('escuela');readln (a[totalu].escuela); write ('cveCentroT');readln (a[totalu].cveCentroT); write ('apePatA');readln (a[totalu].apePatA); write ('apeMatA');readln (a[totalu].apeMatA); write ('grupo');readln (a[totalu].grupo); write ('turno');readln (a[totalu].turno); if band:=false Then Totalu:=totalu+1; A [totalu].curp:=curp1; Write ('nombre:'), readln (a[total].nombre); Else Writeln('el alumno ya existe'); Write ('desea ingresar otro alumno [s/n]; readln (o)'); Until (op='N') or (op='n'); End; Procedure listar_alumnos (a:alumnos; totalu:integer); Var I:integer; Begin For i:=1 to totalu do Writeln (a[i].curp,' ',a[i].nombre,' ', a[i].ap pat,' ', a[i].ap mat,' ', a[i].escuela, ' ', a[i].cveCentroT, ' ', a[i].grupo, ' ', a[i].turno, ' ',); Readln; End; Procedure leercalif (a:alumno; totalu:integer; var b:boletas;var totbol:integer); Var Band:Boolean; Mater:materias; X,i:integer Curp1:string; Op:integer; Begin If totalu=0 then Begin Write ('no hay alumnos escritos press any key to continue'); Readln; End Else Begin Write ('curp'); readln (curp1); Band:= false; For i:= to totalu do If a[i]. curp =curp1 Then Begin Band:=true; X:=i; End; If band:= true Then Totalu:=totalu+1 B [totalu].curp1; For i:= 1 to totalbol do If (b[i].curp=curp1) and (b[i].asignatura=mater) Band=true If band=true then Write ('ya registraste esta materia.. press..'); Write ('quieres ingresas otra asignatura [s/n:'); Readln (op1) Until (op1='N') or (op1 = 'n') End;
Valora esta pregunta


0