MIPI_AdvancedC_FRTK/Lect1/16_task_7_page_24.c

18 lines
214 B
C
Raw Normal View History

2024-11-14 08:45:50 +03:00
#include <stdio.h>
#include <stdint.h>
int32_t unset_rightmost (uint32_t n)
{
return n & (n - 1);
}
int main ()
{
int32_t a, res;
scanf("%d",&a);
res = unset_rightmost(a);
printf("%d", res);
return 0;
}