SHARE
TWEET

Untitled

a guest Oct 21st, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. struct Vector2Jandu{
  4.     int x;
  5.     int y;
  6. };
  7.  
  8. int main ()
  9. {
  10.     struct Vector2Jandu vector1;
  11.     struct Vector2Jandu vector2;
  12.    
  13.     // vector1 = {3,2}
  14.     vector1.x = 3;
  15.     vector1.y = 2;
  16.    
  17.     //vector2 = {5,5}
  18.     vector2.x = 5;
  19.     vector2.y = 5;
  20.    
  21.     struct Vector2Jandu vector3;
  22.     vector3.x = vector1.x + vector2.x;
  23.     vector3.y = vector1.y + vector2.y;
  24.  
  25.     printf("El vector resultado es (%d,%d)\n",vector3.x,vector3.y);
  26.  
  27.     getchar();
  28.     return 0;
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top