Advertisement
fqrmix

Try to help

Oct 18th, 2016
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.90 KB | None | 0 0
  1. /********************************FUNCTIONS.CPP********************************/
  2. #include "define.h"
  3. #include "functions.h"
  4.  
  5.  
  6. struct CompValue Complex[size1];
  7.  
  8. float module_complicate(float x, float y) {
  9.  
  10.     return sqrt(pow(x, 2) + pow(y, 2));
  11.  
  12. }
  13.  
  14. CompValue input(CompValue *Complex){
  15.  
  16.     scanf("%f %f", &Complex->x, &Complex->y);
  17.     Complex->module_complicate = module_complicate(Complex->x, Complex->y);
  18.     return *Complex;
  19.  
  20. }
  21. /********************************FUNCTIONS.H********************************/
  22. #include <math.h>
  23. #include <stdio.h>
  24. #include "define.h"
  25.  
  26. struct CompValue
  27. {
  28.     float x;
  29.     float y;
  30.     float module_complicate;
  31. };
  32.  
  33. extern CompValue input(CompValue *Complex);
  34. extern float module_complicate(float x, float y);
  35. extern struct CompValue Complex[size1];
  36. /********************************DEFINE.H********************************/
  37. #define _CRT_SECURE_NO_WARNINGS
  38. #define size1 100
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement