Abstract, Discussion
Abstract, Discussion
This project aims to get the results of a tournament contain 4 teams, all teams must play
against each other once. Thus, 6 matches are played all over the tournament. The team who
wins earn 3 points, and who draw earn one point and who lose earn 0 point. At the end, our
project had to present the ranking of each team, and the total points and the number of goals
entered if there two teams have the same total points.
Discussion:
-At the beginning, the project is made to present the total result of teams after playing their
matches. Teams have won earn 3 points, who draw earn one point and who lose earn 0 point
so, we decided to choose IF condition to perform our code.
-IF condition used in most of functions to check if the team had lost to get 0 point or won to
get 3 points or drawn to get one point.
-A build in function had been chosen in the project to generate a random number from 0 to
32767, which is rand(), we used this function and divide it by 2 to get a result of 0 or 1
which is the remainder of the odd and even numbers.
-The project had to present at the end each team with his rank, name, and points, also the
goals scored or the difference goals if two teams have the same points to get the correct rank.