Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program 5
- var
- begin
- for i:=1 to 10 do
- begin
- writeln('Insira um valor');
- readln(num[i]);
- end;
- for i:=1 to 10 do
- begin
- for j:=2 to i-1 do
- if i mod j = 0 then
- begin
- flag:=1;
- j:=i;
- end;
- for j:=2 to num[i]-1 do
- if num[i] mod 2= 0 then
- begin
- flag:=1
- j:=1;
- end;
- if flag=0 then
- writeln('O indice ',i,' e o seu conteudo sao ambos impar');
- end;
- end.
Add Comment
Please, Sign In to add comment