Advertisement
amolab

Untitled

Feb 18th, 2014
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. void suma_complejos(struct complejo *datos, int num_datos, struct complejo *resultado) {
  2.     double x=0, y=0;
  3.     int i;
  4.  
  5.     for(i=0;i<num_datos;i++){
  6.         x=x+*datos.real;
  7.         y=y+*datos.imaginario;
  8.         datos++;
  9.     }
  10.     *resultado.real=x;
  11.     *resultado.imaginario=y;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement