Advertisement
k0mZ

Untitled

May 30th, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. int b=1,d=0,r=1;
  2. FILE *f;
  3. f = fopen("binarne-cifre.txt","r");
  4. while(!feof(f)){
  5. fscanf(f,"%d",&b);
  6. d+=b*r;
  7. r*=2;
  8. }
  9. printf("%d",d);
  10. fclose(f);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement