Advertisement
shohan11421

Untitled

Oct 1st, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.     int n, i, count;
  5.     double a;
  6.     scanf("%d", &n);
  7.     for(i = 1; i <= n; i++){
  8.         scanf("%lf", &a);
  9.         count = 0;
  10.         while (a > 1) {
  11.  
  12.             a /=2.00;
  13.             count++;
  14.         }
  15.         printf("%d dias\n", count);
  16.     }
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement