Advertisement
Guest User

Untitled

a guest
May 22nd, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. Team members: Filip Gula, Kacper Kamiński
  2.  
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5.  
  6.  
  7. struct Mass
  8. {
  9. float kg;
  10. float xcoor;
  11. float velocity;
  12. };
  13. int main()
  14. {
  15. struct Mass mass;
  16. printf("Enter the value of mass(the mass cano nly be positive and should be not be larger than 1000kg!): ");
  17. scanf("%f", &mass.kg);
  18. printf("\nthe value of mass is: %f \n ", mass.kg);
  19. printf("Enter the value of xcoordinate(xcoordinate should be between−100m and +100m): ");
  20. scanf("%f", &mass.xcoor);
  21. printf("\n value of xcoordinate is %f: \n", mass.xcoor);
  22. printf("Enter the value of velocity in x-direction(The velocity should be between−100m/sand+100m/s): ");
  23. scanf("%f", &mass.velocity);
  24. printf("\nthe value of velocity in x-direction is %f \n", mass.xcoor);
  25.  
  26.  
  27.  
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement