Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdlib.h>
- #include<math.h>
- int main()
- {
- int o = 0;
- int r = 0;
- int a = 0;
- while(1)
- {
- r = 0;
- scanf("%i",&a);
- while(a != 0)
- {
- o=a%2;
- a=a/2;
- r=r+1;
- if((o == 1) && (a == 1))
- {
- printf("No two in stepen");
- break;
- }
- if((o == 0) && (a == 1))
- {
- printf("two in stepen:");
- printf("%i",r);
- break;
- }
- }
- system("pause>0");
- system("cls");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement