You are on page 1of 6

Ao de la Consolidacin Econmica y

Social del Per

LENGUAJE DE
PROGRAMACIN

Ing. JOSE OLIVERA ESPINOZA

PROGRAMAS

JAUREGUI MANDUJANO Brando Marlon

HUANCAYO-PERU 2010

1.SET ECHO OFF


SET STAT OFF
SET TALK OFF
CLEAR
CO= SPACE (4)
LE= SPACE (4)
Z= SPACE (5)
@5,20 SAY "UNIVERSIDAD NACIONAL DEL CENTRO DEL PERU"
@6,22 SAY "IMPORTE A PAGAR PARA EL EXAMEN DE ADMISION"
@7,23 SAY "INGRESE EL VALOR DE NIVEL A,B,C" GET CO
@8,24 SAY "A: BUENA"
@9,24 SAY "B: REGULAR"
@10,24 SAY "C: MALA"
@11,23 SAY "QUE TIPO DE COLEGIO CURSO:N,P?" GET LE
@12,24 SAY "N: NACIONAL"
@13,24 SAY "P: PARTICULAR"
READ
DO CASE

Endcase

CASE CO = "A" and LE="N"


Z =300
CASE CO= "A" AND LE ="P"
Z= 400
CASE CO= "B" AND LE ="N"
Z= 200
CASE CO= "B" AND LE ="P"
Z= 300
CASE CO= "C" AND LE ="N"
Z= 100
CASE CO= "C"AND LE ="P"
Z= 200

2.SET ECHO OFF


SET STAT OFF
SET TALK OFF
CLEAR
CO= SPACE (4)
LE= SPACE (4)
Z= SPACE (4)
@5,20 SAY "UNIVERSIDAD NACIONAL DEL CENTRO DEL PERU"
@6,22 SAY "DESCUENTO DE PORCENTAJES"
@7,23 SAY "INGRESE LA OCUPACION P,C,D,N,O" GET CO
@8,24 SAY "P: POLICIA"
@9,24 SAY "C: PROFESOR "
@10,24 SAY "D: DOCENTE"
@11,24 SAY "N: NO DOCENTE"
@12,24 SAY "O: OTROS "
@13,24 SAY "C: MALA"
@14,23 SAY "QUE TIPO DE RENDIMIENTO TIENE:A,B,C?" GET LE
@15,24 SAY "A: BUENO"
@16,24 SAY "B: REGULAR"
@17,24 SAY "C: DEFICIENE"
READ
DO CASE
CASE CO
Z =60
CASE CO
Z =30
CASE CO
Z =10
CASE CO
Z =50
CASE CO
Z =20
CASE CO

= "P" and LE="A"


= "P" and LE="B"
= "P" and LE="C"
= "C" and LE="A"
= "C" and LE="B"
= "C" and LE="C"

Z =10
CASE CO
Z =40
CASE CO
Z =20
CASE CO
Z =0
CASE CO
Z =40
CASE CO
Z =10
CASE CO
Z =0
CASE CO
Z =30
CASE CO
Z =0
CASE CO
Z =0

= "D" and LE="A"


= "D" and LE="B"
= "D" and LE="C"
= "N" and LE="A"
= "N" and LE="B"
= "N" and LE="C"
= "O" and LE="A"
= "O" and LE="B"
= "O" and LE="C"

endcase
3.@0,1TO 07,43
NA=00
@03,10 SAY "INTRODUSCA TU EDAD:" GET NA PICT "999"
READ
DO CASE
CASE NA=1
@05,20SAY"365 DIAS"
CASE NA=2
@05,20SAY"730 DIAS"
CASE NA=3
@05,20SAY"1095 DIAS"
CASE NA=4
@05,20SAY"1460 DIAS"
CASE NA=5
@05,20SAY"1825 DIAS"
CASE NA=6
@05,20SAY"2190 DIAS"
CASE NA=7
@05,20SAY"2555 DIAS"
CASE NA=8
@05,20SAY"2920 DIAS"
CASE NA=9
@05,20SAY"3285 DIAS"
CASE NA=10
@05,20SAY"3650 DIAS"
CASE NA=11
@05,20SAY"4015 DIAS"
CASE NA=12
@05,20SAY"4380 DIAS"
CASE NA=13
@05,20SAY"4745 DIAS"
CASE NA=14
@05,20SAY"5110 DIAS"
CASE NA=15
@05,20SAY"5475 DIAS"
CASE NA=16
@05,20SAY"5840 DIAS"
CASE NA=17
@05,20SAY"6205 DIAS"
CASE NA=18
@05,20SAY"6570 DIAS"
CASE NA=19
@05,20SAY"6935 DIAS"
CASE NA=20
@05,20SAY"7300 DIAS"
ENDCASE
4.set echo off
set stat off
set talk off
clear
n=0

RANGE 1,20

a=0
f=1
do while n=0
clear
@2,45 say "Factorial de un Numero"
@5,4 say "Numero:" get n
read
do while n>0 or n=0
a=a+1
f=f*a
if n=a or n=0
exit
endif
enddo
clear
@2,45 say "el factorial del numero es:"
@4,5 say f
x=space(1)
@6,4 say "desea continuar (s/n):" get x
read
if x="s"
n=0
f=1
a=0
loop
else
exit
wait
endif
enddo
5.set echo off
set stat off
set talk off
clear
N=0
f=4
c=15
@2,40 say "TABLA DE RAICES"
@3,18 say " numero
do while N<100
N=N+1
f=f+1
@f,c say N
@f,c+15 say N**(1/2)
@f,c+30 say N**(1/3)
@f,c+45 say N**(1/4)
if f=14
wait
@4,0 clear
f=4
c=15
endif
enddo
wait

cuadrada

6.set echo off


set stat off
set talk off
clear
s=0
p=0
x=0
?"
Ingreso de Datos"
input "Cuantos nmeros? : " to c
do while x<c
input "Nmero :" to n
s=s+n
x=x+1
enddo
p=s/c
@10,5say"Promedio : "
??P
Wait

cubica

cuartica"

7.SET TALK OFF


SET ECHO OFF
CLEAR
s=0
p=0
d=0
@1,0 TO 5,50
@5,0 TO 20,50
@02,10 SAY "Velocidad Promedio: "font "arial",12 color rgb(255,58,12)
@4,07 say " Ingrese numero de distancias y sus tiempos respectivos: " font
"arial",12 color rgb(255,58,12)
input "Ingrese n? : " to c
for x=1 to c
input "tiempo:" to t
s=s+t
endfor
for x=1 to c
input "Distancia :" to d
d=d+c
endfor
p=(d*s)/d
?"Promedio : "
??P
wait
8.SET TALK OFF
SET ECHO OFF
CLEAR
s=0
p=0
d=0
@1,0 TO 5,50
@5,0 TO 20,50
@02,10 SAY "Velocidad Promedio: "font "arial",12 color rgb(255,58,12)
@4,07 say " Ingrese numero de distancias y sus tiempos respectivos: " font
"arial",12 color rgb(255,58,12)
input "Ingrese n? : " to c
for x=1 to c
input "tiempo:" to t
s=s+t
endfor
for x=1 to c
input "Distancia :" to d
d=d+c
endfor
p=(d*s)/d
?"Promedio : "
??P
wait
9.set echo off
set stat off
set talk off
clear
s=0
p=0
?"
Ingreso de Datos"
??" "
@4,07 say " Ingrese numero de elementos"
input "Ingrese n? : " to c
for x=1 to c
input "elementos:" to t
s=0*t
ENDFOR
C=C+1
P=P*C
?" "FACTORIAL:" get P
Wait

You might also like