Sunteți pe pagina 1din 2

Calculo del numero mayor Proceso sin_titulo escribir 'PONE TODOS LOS NUMEROS QUE QUIERAS Q YO CALCULO EL MAYOR'

escribir ' ' bmay<-'V' resp<-'S' Mientras resp='S' o resp='s' Hacer escribir 'INGRESE UN NUMERO:' leer N si bmay='V' Entonces may<-N bmay<-'F' sino si n>may Entonces may<-N FinSi FinSi escribir 'QUERES COMPARARLO CON OTRO NUMERO ? (S/N)' leer resp FinMientras Escribir 'EL NUMERO MAYOR ENTRE T0D0O0S LOS QUE PUSISTES ES: ',may Escribir 'HASTA MANIANA' FinProceso

Decimal a binario

Proceso sin_titulo escribir 'INGRESE DECIMAL' leer x si x>0 entonces coc<-x i<-1 binario<-0 mientras coc<>1 Hacer binario<-binario+(coc MOD 2)*i coc<-TRUNC(coc/2) i<-i*10 FinMientras binario<-binario+(coc MOD 2)*i escribir binario FinSi FinProceso

Proceso Calculador de factorial resp<-'s' mientras resp='S' o resp='s' Hacer Escribir 'TE PUEDO CALCULAR TODOS LOS FACTORIALES QUE QUIERAS' Escribir 'Pone un numero y te saco el factorial:' Leer N fact<-1 Para I<-1 hasta N Hacer fact<-fact*I FinPara Escribir 'El factorial de ',N,' es: ', fact Escribir 'Desea calcular otro factorial? (S/N)' Leer resp FinMientras Escribir 'Hasta maniana' FinProceso

Proceso sin_titulo Escribir "ingrese un entero"; Leer num; Si num>0 Entonces Escribir "ES POSITIVO"; Sino Si num<0 Entonces Escribir "ES NEGATIVO"; Sino Escribir "ES CERO"; FinSi FinSi Si num<>0 Entonces r<-num mod 2; Si r=0 Entonces Escribir "es par"; Sino Escribir "es impar"; FinSi Sino Escribir "es nulo"; FinSi FinProceso

S-ar putea să vă placă și