algoritmo "numeroprimo"
var
Num,i,divisores:inteiro
inicio
escreval("digite um número")
leia(Num)
para i de Num ate 1 passo-1 faca
se num mod i=0 entao
escreval(i," é divisor de ",num)
divisores<-divisores+1
fimse
se divisores=2 entao
escreval("o número é primo")
senao
escreval("o número não é primo")
fimse
fimpara
fimalgoritmo
segunda-feira, 19 de abril de 2010
domingo, 18 de abril de 2010
Lista George alg.15 usando vetor
http://www.4shared.com/file/eBGSuCBb/alg15vetor.html
http://www.4shared.com/document/6bNE89xB/alg15vetortxt.html
Lista George alg.7
algoritmo "maior_menor"
var
x,a,b,i :inteiro
inicio
leia(x)
a<-x
b<-x
para i de 2 ate 5 passo 1 faca
leia(x)
se x>a entao
a<-x
senao
se xentao
b<-x
fimse
fimse
fimpara
escreva(a,b)
fimalgoritmo
sábado, 17 de abril de 2010
Lista George alg.15
http://www.4shared.com/file/uNk3uFEX/alg15.html
http://www.4shared.com/document/nkxpCIuJ/alg15txt.html
Lista George alg.9
http://www.4shared.com/file/UVkvD_LZ/alg09.html
http://www.4shared.com/document/cipjF8ce/alg09txt.html
Lista George alg.6
http://www.4shared.com/file/FUS4a0E8/alg06.html
http://www.4shared.com/document/82BkXtJ4/alg06txt.html
Assinar:
Postagens (Atom)
