daily pastebin goal
67%
SHARE
TWEET

Untitled

a guest May 17th, 2018 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5. int main() {
  6.    
  7.     int a=715, b=0, c=1;
  8.     int i=0;
  9.    
  10.     for(i=0; i<sizeof(int)*8; i++)
  11.     {
  12.         if(a&c==1) b+=1;
  13.         a>>=1;         
  14.     }      
  15.     printf("%d", b);
  16.        
  17.    
  18.    
  19.     return 0;
  20. }
RAW Paste Data
Top