1 2 3 4 5 6 7 8 9 | #include<stdio.h> int main() { int a,b=0xaaaaaaaa,c=0x55555555; printf("\n enter the number: \n"); scanf("%d",&a); a=((a&b)>>1)+((a&c)<<1); printf("\n %d",a); } |
I2luY2x1ZGU8c3RkaW8uaD4KaW50IG1haW4oKQp7CiAgICBpbnQgYSxiPTB4YWFhYWFhYWEsYz0weDU1NTU1NTU1OwogICAgcHJpbnRmKCJcbiBlbnRlciB0aGUgbnVtYmVyOiBcbiIpOwogICAgc2NhbmYoIiVkIiwmYSk7CiAgICBhPSgoYSZiKT4+MSkrKChhJmMpPDwxKTsKICAgIHByaW50ZigiXG4gJWQiLGEpOwp9
prog.c: In function ‘main’: prog.c:6: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result prog.c:9: warning: control reaches end of non-void function
-
upload with new input
-
result: Success time: 0s memory: 1724 kB returned value: 4
42
enter the number: 21


