Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Team members: Filip Gula, Kacper Kamiński
- #include <stdio.h>
- #include <stdlib.h>
- struct Mass
- {
- float kg;
- float xcoor;
- float velocity;
- };
- int main()
- {
- struct Mass mass;
- printf("Enter the value of mass(the mass cano nly be positive and should be not be larger than 1000kg!): ");
- scanf("%f", &mass.kg);
- printf("\nthe value of mass is: %f \n ", mass.kg);
- printf("Enter the value of xcoordinate(xcoordinate should be between−100m and +100m): ");
- scanf("%f", &mass.xcoor);
- printf("\n value of xcoordinate is %f: \n", mass.xcoor);
- printf("Enter the value of velocity in x-direction(The velocity should be between−100m/sand+100m/s): ");
- scanf("%f", &mass.velocity);
- printf("\nthe value of velocity in x-direction is %f \n", mass.xcoor);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement