document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include "test.h"
  2. #include <stdio.h>
  3. #include <string.h>
  4. #include <stdlib.h>
  5.  
  6. /*
  7.  http://www.esdebian.org/foro/19755/regresar-cadena-funcion
  8. $ $ gcc -Wl,-soname=test.so -o test.so -std=c99 -fpic -shared -shared-libgcc test.c
  9.  
  10. como root:
  11. #  cp /home/minino/char/test.so /usr/lib/test.so
  12. # ldconfig /usr/lib
  13.  
  14. */
  15.  
  16. double sumar(double a, double b){
  17.     double valor;
  18.     valor=a+b;
  19.     return valor;
  20. }
  21.  
  22.  
  23. void duplica(int dimension, double *Datos, double *Solucion){
  24.    
  25.     for ( int i=0 ; i<dimension ; i++ )
  26.         {
  27.             Solucion[i]=Datos[i]*2;
  28.         }
  29.    
  30. }
  31.  
  32.  
  33. double ValorarTablero(double *Tablero,int ancho){
  34.     double valor=0;
  35.      for(long i=0;i<ancho;i++)
  36.     {
  37.         long c1=i*ancho;
  38.         for(long j=0;j<ancho;j++){
  39.             valor += Tablero[j+c1];
  40.         }
  41.     }
  42.     return valor;
  43.    
  44. }
');