Advertisement
Sabbir-bin

solve the physics

Dec 6th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1.  #include<stdio.h>
  2.  int main()
  3.  {
  4.    float s, u, t, v;
  5.     float g=9.8;
  6.   printf("\tsolve the physics\n");
  7.  printf("\t--------------------\n");
  8.    printf("\n.Starting velocity:-");
  9.    scanf("%f",&u);
  10.  
  11.     printf("\nEnding velocity:-");
  12.    scanf("%f",&v);
  13.  
  14.    printf("\nTime:-");
  15.    scanf("%f",&t);
  16.  
  17.      s=(u*t)+.5*(g*t*t);
  18.  
  19.    printf("\nThe distance is %f",s);
  20.  
  21.    printf("\n\n");
  22.  
  23.    return 0;
  24.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement