Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Problemas
Problemas
1. Program ✗ Y integer -
33.0.00 ,
-133000
1
pag
Var
i. il : integer ;
[ comentarios
]
begin
read cil ; { i →
teclado }
il : = idiu 10
,
{ ir →
decenas de i 4
¡1 .
-
= ( I mod -10 ) -
IÓ + i 1 -101
Write i 1-0
City
.
wow
✗ Y
¥
⇐
Lo el
que quiere conseguir programa
meto ✗
XX -
quiero ✗
Probar con
90
oq
invierte ;
Program
Vari, U
,
d :
integer
begin
read cil ; { i →
teclado }
d : = idiu 10
,
{ ir →
decenas de i le
U
-
.
= ( I mod -10 ) -
IÓ + i 1 -101
Write (u, d) ;
4
pág 2
ej
51 h 60-1 S
60°
36¥
m
.
.
.
=
'
60
Program minutos
var
so : long int
; integer
n m s
, ,
begin
read ( so ) ;
h : =
so diu 3600
(SO dio 60
m : = mod 3600J ;
s:
(( mod 3600 ) div 60 ) dio 60
= so
;
Write ln :)
'
(
'
jln
' '
so ,
-
segundos _
,
horas
,
m,
- min
Ejercicios básicos
P 1 10
.
ej .
Program binario .
Vas
i :
integer
32
d-
16
@
Ejercicios básicos
P 1 10
io
Éi a
; ② 4-2
.
ej .
Program binario .
Vas
a
,
Io , Ir ,
Ir ,
I}
,
Iu , Isis :
integer
begin
;mod {
read ( al introduce ni < 324
Io : = a 2 ;
in : = la dio 2) mod z
il : =
(( adiu 2) diva ) mod 2
I } : =
( ( ( adiv 2) oiu 2) diu 2) mod 2
mod
iy : =
(( ( adiv 2) oiuz )) diu 2) diu
( 2) 2
i s :< ((( ( adiv 2) oiu 2) diu 2) diu
( 2) diu 2) mod 2
mod }
(((( ( adiv 2) oiu 2) diu 2) 2) div
✗I 2) diu
2)
G : =
( diu
Write ln ( io ,
is ,
in ,
iz ,
iz , irio )
and
-
2.
(á÷(
a-ib-c.ae/(atb-'C-b)(a-ib+cS-- a a z
-
C
Program triángulo
Var
a. b. c. S : real
A
;
semiper
begin
read ( a. b. e) ;
semi = ( a + b + c) / 2
per
: .
a) ( Semper b) ( Semper
-
-
CD
uwiteln ( S ) ;
end .
8. Program 8 .
var :
a. b. aux : integer
egin .
b. =L
a. = 1
; ;
aux : a
;
-
_
=D
a : ;
b : = aux
;
Ejemplos powerpoint
program - - -
-
Veer
C : Char ; ii.
integer
begin '
{guardar
'
A
read (c)
;
una
} [ =
-
programa .
begin
read cil
; { it [ 1 . - -24 ]
¡ i. = ¡ +64
Writelnlcnrci» )
II 96
{
: = i + .
uriteenccnrlirl )
;
Program ;
. . .
begin
]
' ' '
I Z
mayúsculas
'
read CCI e A → en
; c . . _
i: =D rocas
;
ir :-. i -132
;
-
{ 91--65
oro (
'
a
'
) -
oro CA' )
c:
Curci ) ;
uritelnlcl ;
end .
Problemas Básicos
① program 1
ej
{ el usuario escribe ✗Ha
begin '
)
'
write ( Escribe un número de dos cifras :
render ( ) ; a
b : = i div 10 ;
c : = i mod 10 ;
wsiteln ( c
,
b) ;
end
② program ej
2
Veer
i ,
ce , b, c : integer
begin
cifras: )
'
writeln (
'
Escribe un número de tres
render (i )
a : = i dio 100
;
b: = (i mod 100 ) dio 10 ;
c: =
Ci mod 100 ) mod 10 ;
uriteln (c b. a)
,
;
and
③ program ej 3 .
Var
a. b , c :
integer
begin '
write ( Escribe un número menor
que 100 :')
recedln ( ) ; a
b : = i div 10 ;
c : = imod 10 ;
wsiteln ( c
,
b) ;
end
④ 4
program ej
Veer
i ,
ce , b, c : integer
begin '
1000 : )
(
'
writeln Escribe un número menor que
render (i )
a : = i dio 100
;
b: = (i mod 100 ) dio 10 ;
c: =
Ci mod 100 ) mod 10 ;
uriteln (c b. a)
,
;
and
⑤ Program ej 5
var
i : cnaractes
a:
integer
begin
uriteln L' Escribe una letra mayúscula :') .
read (i ) ; { →
puede ser la A
,
B, C .
? }
a: ord Li ) -
64
;
uritelnca ) ;
end
⑥ program ej 6
Vas
i. b : characters a: integer
begin
( Escribe
'
uriteln una letra minúscula :')
;
read ln (i ) ;
ce : = ordci) -
32; { en el caso de la a devela
b: =
Chr (a) .
97-32=65 4
A }
(b) Í
la
uriteln
-
{ es
end
⑦ program ej 7
Vari
:
begin
wríteln ( Escribe
'
número natural : )
'
un
read (it
⑧ program ej 8
van
a, b, c :
integer
begin
( Escribe )
'
write ln
"
2 valores .
read ( a b),
a: =
C
a :-b
b:= a
writeln ( a b) ,
and
⑨ Program ej
9 130<2020
-
te
13
-
a
-
- / .
220 < y
Nar 10-000
i. cyb c :
integer 02 b
-2020
=
,
begin
written ( "Escribe una
fecha ):
'
reader ( i )
a : =
i div 10° ;
b :-. (i mod 109 dio 104
C : =
[ mod 109 mod 104
c)
'
usriteln (n b
' '
del
'
de
end
&
⑨ lo
Program g.
vas
a Io , Ir Ir is , in is , :
, , , ,
integer
begin
;mod {
read ( al introduce ni < 324
io : = a 2 ;
in : = la dio 2) mod 2
il : =
(( adiu 2) diva ) mod 2
I } : =
( ( ( adiv 2) oiu 2) diu 2) mod 2
mod
in : =
(( ( ( adiv 2) oiu 2 ) ) diu 2) diu 2) 2
i s : =
((( ( ( adiv 2) oiu 2) diu 2) diu 2) diu 2) mod 2
Write ln ( is ,
in ,
iz ,
iz , irío )
and -
① Probar en casa .
② .
área de S .
a) ( b) (
aire aire
[I) (
+ ☐ + a a
s
-
a
- -
2 2 2
Program área
var
a.b. C , Semper :
integer
begin
read Ca b. c) ; ,
semi per : =
(atbtc) 12 ;
S : =
sqrt ( (Semper ) (semi per -
a) Csemiper b) ( Semper c)
- -
Y
uriteln (S )
;
end
③ program ecuación
varia ,
b. i :
integer .
begin
readln la b) ; /
✗ : = ( b
-
/ a)
Write ln IN
and 5794 ☒
304 9. 5
④ programa
minutos %
van 95
i 1
35
-
begin
read ln ( i )
ce : i mod= 60
b : = (I diu GO I mod 60
C : =
(I die 00 ) div 60
' "
uritebn ( segundos )
' ' ' ' '
horas b minutos
'
'
a
c , y
end
Programa muestra la division entre 2 ni reales .
prog
Vdr
✗ : real :
, g
begin
read cx ) creced ( )
,
y
uriteln ( ✗ / y )
end
- -
- - - -
-
- - -
- - - - -
prog
var
ab ,
c : rear
begin
read Val , creced (b) ,
readlc )
uríteln (
Problemas point
power -
coche
Program
Vas
mfe , b ,
c :
integer
begin
read ln (a. b CI >
else
el se
else
and (cza) they
if ( BFC )
M: = b. C ,
a
else
on : = c. a. b
uriteln ( m )
end
cakdadora
program
vas
a, b, c : real
begin
if readlnlatb) el
real ehar
real
:
año
program .
var d na
begin
read cifra)
100 ;
a. =
cifra div
mki-_@fradiue00Imsd1Qqdi-_f.fradiu 100001 ;
if lm .
-
1)
'
curita ( Eees
elsa if (M » )
uwitelh ( -11400)
'
de
'
a
,
programe
"
:
I
begin
read ( m a)
,
if ( Min ) or ( m =3 ) or ( m :S
) . . .
- -
)
)
'
write ( se dices '
)
'
unite ( '
Isaías )
( Febrero )
'
'
el>e irrite (128 dias )
coche
Program
if Los -
> Oz )
begin
aux : = Or
;
01 : = 02
02 : = aux
;
begin
aux : =
02 ;
02 : = 03
03 ;
: = aux
begin
aux : = Or
;
01 : = 02
02 : = aux
;
end .
program calculadora
var
.
a. b , d : integer c : anar
begin
urite :-(" Introduce 2 números y una operación )
readln : a ,
b -
C
if ( c. ) urite
'
(iaxb )
'
'
= t tren
m : = atbad
then Write (
'
Kcí b )
' '
else I
if
- a-
m : :
a- b =D
(
' '
alb )
' '
m :-. a /b =D
elsevur .
-
te Caxb )
m :<axb =D
uriteln Lml
and .
3. 5 T 2.2
-
le importa el
read ( ( operación) n :
op ↳
read ( 2° ni )
(naj
'
if op
=
'
t then
hedor En -1
'
'
un
, op ,
nr ,
=
inuit nz) )
then
'
else ij =
' -
op
uniteln ( ni au ,
neo : n
,
' -
'
in .
-
ni )
llseij Op . -
-
- -
-
- -
Clse if
-
-
-
-
-
. -
-
-
eese
'
uriteln ( '
Error desconocida op" )
and
program
Co
,
C : character
Var pos -
por : bordean
suma -
par suma _
impar : integer
begin
,
un termines con
y
read ( c )
while ( C < >
'
#
'
I do
begin
co : = C
'
I
'
if ( Co
'
O
'
= S or co =
par
: = O
read ( c )
pos por :
- True =
read ( c )
while ( casi # I do
'
begin
if ( pos _
par)
Suna : suma Ord (c) Ord (8)
para
-
pas
-
= _
else
suma _
impar : = suma impar _
+ Ordcc ) -
Ord
not 49
impar : =
pos por no
-
pos
- -
1- 49
C suma
por Suna impar
-
: =
- -
begin
)
'
Cmod
'
( 11 O
if =
( )
'
divisible para
'
then written Es 11
and
and
end
1 lea enteros terminada O muestre
programa que
una secuencia de en
y
su suma
programa Suna
Vor
a : cnaracter
suma : integer
begin - suma : :O
render ( d )
(a I do
' '
while <> #
Begin
suma : = Ord a
+
suma
end
write (
- suma )
end
de
1
programa que sume una secuencia de enteros Long especificada
por
el usuario como dato inicial
.
programa soma
var
begin
:
suma = o
end
de entero de un natural
Programa que calme la pst
exp
.
.
n .
program exp .
Veer a
,
n :
integer
begin
read ( a
,
n );
I ¡ = 1
www.i a = n
do
po
t : =
pst -
bases
i : avec Ci )
'
=
;
and
program n
encerrar
ai
integer
n : ;
c : anar
;
cont :
integer ;
begin
Y
'
uriteln ( escriba
'
un carácter y un número :
read ln ( c ,
n );
cont : =
A
while
begin
cont En do
É
a :-. a + cont
p
cont : = cont +1
;
end r
;
+
}
write ln ( a) ;
end
pg
o
Program rectángulo
rar n.n
C :
:
amar
integer ;
,
.
n
}
ca - c a
{ -
i. j integer
:
,
begin
uriteln ( escriba
'
un carácter
y
dos números enteros :')
readln ( c. Min )
For i -
.
=D To n do
begin
For I. = 1 to m do
te )
'
are .
cic
and
written ;
and
M
program alfabeto
ser
Vor L :
integer
cont integer
i
:
µ
c : anar
begin
)
'
uriteln (
'
escriba 97 :
readlnl ↳ )
C : un r
y
cont : = 97
s : =
-
end
201 9
Sep .
Program
Pi ,
Pi 0 : real ;
Nar ×,
y : real ;
bey ¡ N bucle
✗ irand ;
!
{ generamos n
.
aleatorio 4
y rand ;
if ( Squirt ( ✗ ✗ +
y y)
-
< 1) Then
hits : = hits +1
else
miss Miss +1
:
;
=
and
4. hits/ tuits miss))
' '
Write ( Di = ,
;
Program
Pi ,
Pi 0
, precisión : real
Ncer ×,
y:
real ;
beg ¡ ~
Mitchie
con esto entramos
bucle
en el orfabslpi -
aleatorio 4
y rand ;
if ( Squirt ( ✗ ✗ +
y y)
-
< 1) Then
hits : = hits +1
else
miss Miss +1
:
;
=
pi : = 4 hits / ( hits +
niss)
PIO : =
Pi
and
4. hits/ nitsi miss))
' '
Write ( Di =
;
end
linea
rect por ☒
program línea impar
_
varia
n
,
m : integer
Begin
recedlncn.nl
;
dibuja _
oectcniml
;
ero
s proceder dibuja _
rect ( F :
integer , c. integer )
vas
y i :
integer
begin
{
for i. = 1 tordo
2
Dibuja _ lira (C ) ; > procedure dibuja _
líreacc integer)
:
begin
vfipr i : -1 to F do for i : -1 to
C do
ase
and
linea (
'
'
)
dibujar c -
_ ,
program ;
procedure lee _
polinomio (var: Ad BA ,
,
Cl: real )
becas .
~
read ( At ,
Br Cr ) ;
,
end
pa l
A B, C
proceder resolver .
, : @ al sol , sol 2 : real );
begin
I
and
proceder ordenar ( sol ,
sol 2
I
begin
I
and
I
and
Var A ,
B ,
c : real
begin
lee _
polinomio ( A ,
B
,
c
Y
resolver polinomio ( A B ,
C , sol?
,
sol 2 ?
Ordenar [ Sola sol 2)
,
;
mostrar [ sol 1 sol 2)
;
,
end .
proa . binomial (n ; K:
integer var res : int)
begin
factorial lll ,
Fu )
factorial (
K
,
FK
)
factorial (n , FNK)
-
K
res : FN /
=
f- K . FNK)
function fact ( n :
integer) : integer ;
vas
Negar
end .
es : ihleger
res =p
begin
:
to Do
for I = 1 N
RS I
res
.
: =
procedure
var
I:
integer ,
begin
for Ii: :( 000 to 9999 do
begin
if (es nultipbc 36 ) and escapara (I) ) then
uriteln#Y
Factorial .
van =
: ¡ nteger
pas :
Long art .
begin
res : = 1
For i : =L to × da
res : = res -
I
Fact : = res
;
Ej examen: 20190207 .
Ej .
1 .
program
procedure -
,g,qµ,gq,qgy)
vas A
,
B : integer
begin
leer ( A. B)
intervalo
_
;
µ , ,, .am
p
. ¡ m
and .
procedure mostrar _
primos -
enteros (A ,
B :
integer )
var ¡ : integer
begin for i : = A to B do
(it) Then
if les _
primo eq
frito (i ) ;
' '
,
-
bcgir
es _
primo _ 9- : = es _
primo Li ) and (i : -_
antprin
+
Sig -
primo )
-
2
primo (i integer)
function es _ : : bordean
integer
i :
vas
begin '
trae
es _
pv.ms : = ,
lo HARÁ 91dg
for i
'
2 :-.
PEN
uao reintegre ; encontrado : bon ;
besin ✗a
:X - r , encontrado daese
gjqy
,
primo CXC))
ant -
primo = ✗ C; encontrado : = tire .
✗ ci -
_ ✗ c- 1
and
and
\
año :
.
var mes ,
begin
leer mes años ( \
_
imprime _
call
I
and
escribe - cabecera ( M / DI
;
eres CMA ) ;
D- semana : =
primer -
día _
q -
^
por i : = to CD semana e)
-
write ( '
-
'
)
dos mes ( test ) do
la i : 1 &,
_
begin
utite ( i. 61 ;D semana :O semana + y-
-
if (Dsenana.BY then
wrikeln; A- enana =P :
and
and
( MA.int )
function primer dia
._
_
mes :
program
var
F ~ : Longint .
begin
N : = O FN : =
fermat -
num ( N) ;
While ( es _
primo IFN ) ) do
Begin
N N A
;
: = →
"
En :-. fermat -
nunc NI
function fermat - num ( v. integer ) : lonq.int ;
Ucla
begin
fermat -
num
:
= POWLZ , NCZN)-11;
and
begin
aux : -
_
A
los i : -1 to E do
B
Aur .
= dixo ;
Pow:
anj
-
end -
20210120 → sudoku
tpsudoku :
array I 9,1%-9 ] of integer .
" "
begin
Sudoku válido : = filas válidas ( SK
I
and columnas válidas ( SK )
and regiones válidas I SU I ;
func.
filas _ Validas ( const SK : tpsudoku ) : booleano .
Var i :
integer ejempo para saber como
aplicarlo
begin cumple _
condicion : = trae
for
i : = A to Q do if not cumple ( .
) then
↳ condicion
begin -
cumple _
: =
false
not fila válida ( i SK) ) then
if ( _
,
filas _
validas :
-
falsa
Fila válida ; trug
Fane
fila uaeeoafi_
, integer ,
const Sks :-(
psudoku ) : bolear
ver → i. integer .
begin
→ i. A
To 9 ds
for
var
begin irteyer vi.
repetido false ,
if ( sk [ i. j ] -07mn
for K : Jed to G do repetido : -
_
faese
ase
begin
if # [ iyj ] = SK
[ isx ] y then
repetido : atrae :
endend
Ty pre
array [ 9 ]
9
Tp sudoku = 1 . . .
, 1 . . .
of integer .
a
TD cont array [$ . . .
] of
integer ,
f.
una .
linea _
valida (i : integer const SK )
Nao J :
integer
cont : tpaont
begin
linea _
válida : atra
cont : = o
b haces bucle }
to a do
for J:= i
if ( SK [ i, J] = 1) and ( sk [ i
, j] f 9) then
begin
cont [ SK [i J] cont 1
]]
: =
, [ sk Li
, j +
and .
Tp matrix Li i n
]
array n
- = - -
.
. .
Begin
ii. 1
for = to N do
.
= Mr
G. i ];
and
¡
÷
¡
Sept 2020 2
}
-
2019 -3 AD /
feb array 2D
vacía : bordean
'
tipo : Char ;
color
§
'
b banco
'
.
.
Char '
'
n
'
= nedyrs }
-
Tp tablero = ar
rally .
[ r .
. -
8 , 1 .
. .
8]
of
begin
torre buscar
{ si encontramos ok q
coro )
then
begin ( not Tab [ i , j ] vacía and .
color =
escribimos _
alcance Ctab , i , j )
V
M - 23N -26N
no
M 8 -
8-10
T 15-17
Type
tp casilla : record .
vacía : bordean
Tipo ; [ nar
Color : Char
end
Vari , j : integer
begin
to
for ii. = 1 so do
for je :
l to 8 do
(T
'
if fnot )
'
[i, j ] and [ i.
j T
) and
a-
T vacía ] tipo =
(T [ i
, ;] criar = ( caos)
)
mostrar _
alcance
{
" "" ° """" """ """ " " " """
begin
alcance arriba (Y
j );
mostrar _ i
_ , ,
abajo / Ti i,
Ii y _
j );
(
"
j);
''
oer T i
_
, ,
izq 1-1 j) ;
' - "
i
- , ,
FC
fila candidata
→
procedure
mostrar _
alcance _
arriba ltiyj ) ;
var Fc ,
FC I -1
: =
;
begin
Fc I 1
;
: = -
FC I -1
: =
;
begin
Fc : = I - 1 .
Fc : Fc -1
+
if ( not [ FC
j ] vacía ) and ( T [ kc ] color [ i
j] color
, , ¡ a > ,
writeln (T [ Fc
j J
' '
J '
)
tipo
'
FC -
, -
, , ,
,
abajo -
→ +
dóna < a j → i
°'
/
ejercicio cadenas
Type
Tpassay =
aiiay [ 1 . . .
255 ] of Char
begin
read (c )
i : = 1
begin
VEI ] -
.
= C
i : = I -11
read (c)
end
end
Type
Tpassay =
aiiay [ 1 . . .
255 ] of Char
begin
read (c)
¡ :-O
begin
/ Han
' ' ' '
(c ¢ ) (a-
'
/
'
(c
'
' '
if I
'
= a or ( ( = e
-
i I = o or U
or or
_
ii. = i +1
read C
and
end
VEI ] -
.
= C
i : = I -11
aead (c)
Ficheros
Program leer _
;
Type Tp fierro : =
f le of integer;
.
.
Var
F :
Tpf ; Chess
I :
integer
Begin
assiqn ( S Mi primerfichero )
' '
Peset (
f );
while l no
'
eof (F) | do
begin
read ( F IY ,
Write ( I , '
-
'
);
end
clase ( F );
end
tp diccionario
LN
[ entrada
LM
acepciones
Significado String :
begin
i 1
end : =
while ( I En entradas)
_
dos
TP acepciones [ 1 10 ] of tp acepción ;
array begin
= . . .
begm
acepciones : Tp acepciones encontrado : the
and
N -
acepciones :
integer and
record
and
Tp diccionario =
entradas : tp Necntraoas
n. entradas: integer
end
Program leer Ficheros Enteros
numero : integer
begin contpos =
:O
'
) cont
assign IF
'
mi Rivero
, primer rey .
:-. o
not ( FI do
while eof
begin
read , F. muero )
0) then
if ( numero >
cont contaste
pas
:
÷
Clase ( Fl
end
impdat )
'
assiyn
( FI ,
assigr | FP ,
e Parda ' )
sleurite [ FII
remite E- p )
creced ( F
,
I)
if II : Maul ) :O tren
uritq (Fp , #
else
wríll ( FT , -11
Sept 2014 .
Type
Tpifich =
fileof recen;
Fitpficn Vas ✗o
,
✗ i ,
✗a
;
i : integer
Begin Begin
'
Reset (F ) ;
Assign ( F dat ) ✗ modo lectura
'
,
Revoluciones .
.
Mostrar _
Max locales (
_
F ); if ( not c- of If) ) Read ( Exo)
Mostrar _ Un _
locales ( F); if ( not eof (FI) Rud (Exit
if ( ✗ 1) xo) and ( ✗
i > ✗ 1) then
-
Write ( ✗ í
)
while ( not eoflf ) ) do
begin
to -
.
= ✗ i ; ✗i : = ✗ 1;
iflxi > ✗o
) and (✗ i > ✗ 1) then
' '
write ( I ,
→
, xi );
clase (F)
and ;
Febrero 2021
Ej . 2
a) Type
Tp contador array [ 1
. .
10 ]
of integer
Var
F : Tp Fich Vacunas
,
N Tot :
integer ;
Vac : Tp vacíen Dia
Vac 1
integer
:
Ndisp integer:
Vac cont
-
:
Tp contador
Pseagin
" "
Asisgn ( F , Fich Dat )
Reset ( El
,
Nada lectura .
Ntot : = O ; vacd i. =D
while
(not eof ( F) ) do
if vac .
centro = 1
then
Vac cont [ vac centro ] uaccont c.
centro ]
hubiese
: =
✓ •
.
[ si
>
que sumar solo hasta una
Ntst : = Ntste Uac Numvcec
fecha
.
clase ( F )
b) Read ( Ndisp )
For ii : = 1 to to do
sin decimales
Begin 4- runa →
urrte ( I ,
'
-
'
F :
Tp objeto ,
poli .
-1
ppoligons
Begin
Assiqn ( F
,
'
Nobre .
dat
'
)
Peset ( t ) ;
Begin
read CF , POI )
✗ Hacemos cosas,
( calada _
rect - envolvente ( Poll
, Red
and
clase
end
Procedure cancela _
vea
( const P : TP Polígono ,
var
R:
Tprect envy
var i : integer
Begin
for i : = 1 ✗ o P N do
begin
R Un L D-
vértices [ R
Nun i ] Min
f
=
.
{
.
,
implementar
Muay
R Max Max ( P ver [ →
]
: =
picos i R
-
-
funciones
. .
-
FICHEROS de TEXTO -
ÍÍÍ
|
F :
TEXT ;
strino ; (
porque
estás
pidiendo texto )
¿
:
¡
→
readln ( NOM ) ;
|
( F , NOM )
assiglr ;
curiteln
'
( '
VOCALES :
,
;
clase (F) ;
eud ;
y ficheros
siempre uar
si aaaa aaaa -
function cuenta _
vocales ( mar F : TEXT ) :
integer ;
war
chan N vocales
integer
C :
¡ ;
:
begin
( modo lectura )
reset ( F ) ;
j
while ( NOT eof CFI do
begin
read ( F , c) ; procedimiento
_
if Él aun
N vocales : =
N vocales -11 ;
'
Nts cuenta vocales_ : = N Focales ;
{
devolver
No
puede
÷
•
se
F, G :
TEXT
un
fichero en una
fun .
procedure
;
hay que usar un .
" "
"" "
""
¡Í ^^;
read ln I
:[ % mmm
NOM ,
,
)
.
; -
,
puedes leer G
No
⇐ siamés
ya que
es
clase (F)
;
cobre (G)
;
eud ;
:(
copiar sin saltos ( mar F : TEXT mar G : TEXT )
proa _ _
,
;
° : Char
S : striug.fr
modo lectura
.
,
lo
pone en
bergin y
reset ( F ) ;
remite (G) ;
not
while eof (F) do
begin
readln CF , S ) ;
mriteol G ,
S)
;
und ,
↳ Si no
pones ln No escribe
eud ;
Asaltante .
:b ir
II.
su
"
%: .
ir
:b
i. % .
o oir
horario
Program Feb 2014 ei 2
Type
Tp horario
array :[ L M ✗ J V
,
1 . . 24 ]
Tp tarea : record
Dice : anar
in fi
, : integer
Desc :
String
tarea (
Procedure procesa _ siguiente -
var F : text
,
I
Begin
{ Leer tarea
G
Read ( F ,
T . Día )
Read (F
T.in/T.finlPeddlnlF,T.Desc
,
} conflicto }
comprobar
inserta _ en - horario _
end var i. d :
integer
begin
d : = obtener _ dice ( 1- I
i : =
Begin
Var
if h [d , i
] < >
"
then
F : Text begin
Begin uriteln / conflicto )
' '
' ol
- - -
- -
(F
'
txt Y luritelnch
Assign .
horario .
[o ,
i ]| -
,
Reset (F ) ;
writelnlt.de.SC ,
'
end
clase (F)
end
End
Sep 2018 -
3
Func es _
correcta ( M :
Tpmatdis ) : bordean
begin
es correcta : = True
,
_
correcta
es : =
false
es correcta :
false
-
_
end
end
simétrica ( const
Fuera M: tpmcet ) : bromean
begin
simétrica :-. True
}
for iii. 1 to M num filas ds
Imp
-
[i , j then
ij matriz
] < y Munárriz Cij ]
simétrica :
false
-
-
and
Van I :
integer
Begin
Diag .
cero : = True
For i : = 1 to M Numfilas do
if M Matriz [
.
± ,
± ] <> O then
Diay falsa
=
.
cero :
end
Func No - desconectados ( const TP Matdis)
Vari : integer
begin
No - desconectados = True
I : = l to M Nun
filas do
for
if I desconectadoEn then
no _
desconectados :-. False
end
F una V - desconectados :( E :
integer , const n :-(
p Matas
J :
par integer
Begin
V - desconectado : = True
For
j : t to M . Nunca 80
>o
then
j ]
a
if Matriz E
,
v -
desconectado : =
false
and
Sep -2021 tp Usuario =
record
Type num :
String
Tpcount =
array [1900 .
.
2021 ] aye : String
assign ( F
,
usuario _
end
begin
F UI
read ( , ;
contar _
anyos _
vivo ( U
, C)
end
clase (F)
Mostrar _
marino / c)
end;
Vas A :
integer
Begin
Fun : = U .
def
O
then
ij v def =
fin : = 2021
proc Mostrar - Maxim, / Const c: Tpcont )
for A : :O .
Nac to pin do Oar
+1 A
( [A] : = ( [ A ] : integer
end Begin
máx = [[ 1900 ];
dos A
'
- =
1900 to 2021 0s
begin
it naaa CLA ] tren
begin
más i. =
C [ A]
año Max : : A
ero
and
write ( Amax
,
'
-
'
,
Max )
end
Sep zozr
Birgit
Tp Carton =
array [ L, te / < ] Of Integer
V , i
, j : intereses proa en _ tablero
Begin
I
for
: = I . .
L do
for Ji I . .
Me do
begin
V random IN )
While ( en _
tarsero ( v. c) I do
vi. = random ( N ) .
CM Ei , I ] V
: =
end
end