![]() |
A body with the mass M_1 and speed u_1 collides with the body of mass M_2 with speed u_2, and after collision, both bodies stick together and start moving. The surface is frictionless and no energy is lost during collision. In this article, the task is to find the final speed of combined masses if both were initially in the same direction. Example Input: M_1= 4 units, U_1=5 units M_2 =6 units, U_2 =6 units Output: 5.6 units Input: M_1= 3 units, U_1 =2 units, M_2 =1 units, U_2 =6 units Output: 3 units C++ Program to Find Speed of Combine MassWe can conserve linear momentum in this isolated system ,with the equation: It is given that M_1 and M_2 sticks together and moves it will be: We will make sum of initial momentum and divide with total mass to get speed of final system C++
Output 5.6 Time Complexity: O(1) |
Reffered: https://www.geeksforgeeks.org
C++ Programs |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 16 |