Advertisement
dllbridge

Untitled

Aug 21st, 2024
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.80 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3. #include  <math.h>
  4.  
  5. float fG = 9.81;      //  Ëóíà = 1.62
  6.  
  7.  
  8. float how_Time  (float fH);
  9. float how_Speed (float fT);
  10. float ret_Radian(float f_grad);
  11.  
  12.  
  13. /////////////////////////////////////////////////
  14. int main()
  15. {
  16.  
  17.     float fH = 100,
  18.           fT = how_Time (fH),
  19.           fV = how_Speed(fT),
  20.           fRad = ret_Radian(60);
  21.          
  22.     printf("fall_of_time = %.2f\n", fT);      
  23.     printf("Fall speed   = %.2f\n", fV);
  24.    
  25.     printf("Radian   = %.2f\n", fRad);
  26.    
  27.     printf("sinus 60 = %.2f\n", sin(fRad)) ;            
  28. }
  29.  
  30.  
  31.  
  32. /////////////////////////////////////////////////  sqrt( sqrt2*H/g)
  33. float how_Speed(float fT)
  34. {
  35.        
  36.       float fV = fT * fG;
  37.  
  38. return fV;        
  39. }
  40.  
  41. /////////////////////////////////////////////////  sqrt( sqrt2*H/g)
  42. float how_Time(float fH)
  43. {
  44.                  
  45.        
  46.       float ft = sqrt(2*fH/fG);
  47.                    
  48. return ft;                                
  49. }
  50.  
  51.  
  52. //////////////////////////////////////////////////
  53. float ret_Radian(float f_grad)
  54. {
  55.                        
  56. return  (f_grad * 3.14) / 180;                                    
  57. }
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82. /*
  83. #include <stdio.h>
  84.  
  85. const int nSize = 7;
  86.  
  87. int  array[100]= {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11};
  88.  
  89. void vold(int *p, int);
  90.  
  91.  
  92.  
  93. /////////////////////////////////////////////////
  94. int main()
  95. {
  96.     printf(" array=  ");
  97.    
  98.     vold(array, nSize);
  99.    
  100.     for(int i=0; i < nSize; i++)
  101.     {
  102.         printf(" %d ", array[i]);
  103.     }
  104. }
  105.  
  106.  
  107.  
  108. /////////////////////////////////////////////////
  109. void vold(int *p, int n)
  110. {
  111.     int m;
  112.    
  113.     n = n - 1;
  114.    
  115.     for(int i=0; i<(n/2); i++)
  116.     {
  117.         m = p[  i];
  118.             p[  i] = p[n-i];
  119.             p[n-i] = m;
  120.     }
  121. }
  122.  
  123.  
  124.  
  125. */
  126.  
  127.  
  128.  
  129.  
  130.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement