Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program numero;
- Var num, cifra, cifraN, aux: Integer;
- cifrasiguales: Boolean;
- Begin
- write('Ingrese el numero: ');
- readln(num);
- cifrasIguales:= False;
- Repeat
- Begin
- cifra:= num mod 10 ;
- num:= num div 10;
- aux:= num;
- Repeat
- Begin
- cifraN:= aux mod 10;
- aux:= aux div 10;
- cifrasIguales:= cifra=cifraN
- end
- Until cifrasIguales or (aux=0);
- End
- Until cifrasIguales or (num=0);
- writeln(cifrasIguales);
- readln();
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement