main.cpp 467 B

12345678910111213141516171819202122232425262728293031
  1. #include <iostream>
  2. using namespace std;
  3. struct Collision
  4. {
  5. float x;
  6. float y;
  7. bool impact;
  8. };
  9. int main()
  10. {
  11. cout << "Voici le detail de la collision: " << endl;
  12. Collision crash;
  13. crash.x=53;
  14. crash.y=7.5;
  15. crash.impact=true;
  16. if (crash.impact)
  17. {
  18. cout << "La collision a eu lieu en ("<<crash.x<<";"<<crash.y<<")."<<endl;
  19. }
  20. else
  21. {
  22. cout << "Il n'y a pas eu de collision."<<endl;
  23. }
  24. return 0;
  25. }