Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int prv_broj = 0;
- int vtor_broj = 0;
- int main()
- {
- scanf("%d %d",&prv_broj,&vtor_broj);
- if(prv_broj < 1 || vtor_broj < 1){
- printf("Invalid input");
- }
- else{
- int posledni_broevi;
- if(prv_broj>vtor_broj){
- while(prv_broj){
- posledni_broevi = prv_broj%100;
- if(vtor_broj/10 != posledni_broevi%10){
- printf("NE");
- break;
- }
- vtor_broj/=10;
- prv_broj/=100;
- }
- printf("PAREN");
- }
- if(prv_broj<vtor_broj){
- while(prv_broj){
- posledni_broevi = vtor_broj%100;
- if(prv_broj/10 != posledni_broevi%10){
- printf("NE");
- break;
- }
- prv_broj/=10;
- vtor_broj/=100;
- }
- }
- printf("PAREN");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement