Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int N;
- int prevrten_broj=0;
- scanf("%d",&N);
- for(int i=0;i<N;i++){
- int X;
- scanf("%d",&X);
- prevrten_broj = 0;
- for(int j=X;j>0;j/=10){
- int cifra=j%10;
- prevrten_broj=(prevrten_broj*10)+cifra;
- }
- if(X == prevrten_broj){
- printf("Brojot e palindrom\n");
- }
- else {
- printf("Brojot ne e polindrom\n");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement