12345678910111213141516171819202122232425262728293031 |
- #include <iostream>
- using namespace std;
- struct Collision
- {
- float x;
- float y;
- bool impact;
- };
- int main()
- {
- cout << "Voici le detail de la collision: " << endl;
- Collision crash;
- crash.x=53;
- crash.y=7.5;
- crash.impact=true;
- if (crash.impact)
- {
- cout << "La collision a eu lieu en ("<<crash.x<<";"<<crash.y<<")."<<endl;
- }
- else
- {
- cout << "Il n'y a pas eu de collision."<<endl;
- }
- return 0;
- }
|