Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. void fillInputArray(){
  2. int index;
  3. inputs = (int**) malloc(sizeof(int*) * numOfInputVars);
  4. for(int i = 0; i < numOfInputVars; i++){
  5. inputs[i] = (int*) malloc(sizeof(int) * pow(2,numOfInputVars));
  6. }
  7.  
  8. for(int i = 0; i < pow(2,numOfInputVars); i++){
  9. for(int j = 0; j < (pow(2,numOfInputVars)-1); j++){
  10. index = 0;
  11. decToBin(j);
  12. for(int k = numOfInputVars; k <= 1; k--){
  13. inputs[i][index] = newNum[sizeof(newNum) - k];
  14. index++;
  15. }
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement