milardovich

A Decimal

Apr 22nd, 2014
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.19 KB | None | 0 0
  1. long int aDecimal(int bin[10][30], int n, int indice){
  2.     long int nro=0;
  3.     int i,j;
  4.     j=n-1;
  5.     for(i=0;i<n;i++){
  6.         nro= nro + (bin[indice][i])*( (int) pow(2,j));
  7.         j--;
  8.     }
  9.     return(nro);
  10. }
Advertisement
Add Comment
Please, Sign In to add comment