Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdio.h"
- void main(){
- int b=1,d=0,r=1;
- FILE *f;
- f = fopen("binarne-cifre.txt","r");
- while(!feof(f)){
- fscanf(f,"%d",&b);
- d+=b*r;
- r*=2;
- }
- printf("%d",d);
- fclose(f);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement