- #1
MichalXC
- 41
- 0
Homework Statement
I am trying to write (for my own interest) a program in C that solves a simple 1-dimensional physics problem. I want the program to determine the times (after t=0) of the first ten collisions for two elastic balls constrained between elastic walls at x=0 and x=a.
The user will input the radii, initial position, and initial velocity of the two balls.
Homework Equations
I know and understand the dynamical equations governing elastic collisions. My real question concerns the programming aspect... How should I attack the problem? Unfortunately, I am a programming noob and have only been programming for a few weeks.
The Attempt at a Solution
So far, I have used the printf and scanf functions to get the radii, initial position, and initial velocity of the two balls... Help.