Kailash
Kailash
Coimbatore - 641010
March 2023
CRICKET SCORECARD
By
This project report titled SPACE BATTLE PROGRAM USING C LANGUAGE was
prepared and submitted by KAILASH BALAN (71382304022) and has been found satisfactory in terms of
scope, quality and presentation as partial fulfillment of the requirement for the Bachelor of engineering
Coimbatore (SRIT).
Project Supervisor
Assistant Professor
2|Page
Text of contents Pg.no
TABLE OF CONTENTS 3
ABSTRACT 4
LIST OF FIGURES 5
CHAPTER 1 INTRODUCTION 6
8
CHAPTER 2 METHODOLOGY
24
CHAPTER 3 EXPECTED RESULTS AND OUTPUT
25
CHAPTER 4 CONCLUSION
3|Page
CRICKET SCORE CARD PROGRAM USING C
LANGUAGE
ABSTRACT
The Cricket Score Card System represents an essential component within the realm of cricket,
offering a comprehensive platform to record, display, and analyze the progress and outcomes of
cricket matches. This digital system provides real-time updates and statistical data, enabling
enthusiasts, teams,and stakeholders to track the live progress of matches and assess player
performances.
Developed as a software application or web-based system, the Cricket Score Card System captures
and presents an array of crucial match information. It includes features such as score tracking,
individual player statistics, team totals, ball-by-ball updates, match summaries, and historical data
The system's primary focus lies in its ability to efficiently manage live match data. It displays real-
time scores, overs bowled, wickets taken, runs scored, partnerships, and other critical match
statistics, ensuring accurateand prompt updates for spectators, commentators, and team
management.
In addition to live match updates, the system incorporates player profiles and performance metrics,
showcasing batting averages, bowling figures, strike rates, and other pertinent statistics. These
statistics offer insights into player contributions, form, and trends, aiding in post-match analysis
4|Page
List of Figures
Figure No Page no
5|Page
CHAPTER -1
INTRODUCTION
The Cricket Score Card System stands as a pivotal element in modern cricket, revolutionizing the way
matches aretracked, analyzed, and experienced. This digital system serves as the backbone for capturing,
displaying, andpreserving comprehensive match data, providing real-time updates and statistical insights that
In the dynamic world of cricket, where matches unfold with nuances in every delivery, overs bowled, runs
scored, andwickets taken, the Cricket Score Card System emerges as an indispensable tool. Its development as
a software application or web-based platform redefines the way cricket matches are observed and evaluated.
At its core, this system offers an immersive and comprehensive interface that captures the intricate details of
cricketmatches. It includes features such as live score updates, ball-by-ball commentary, detailed player
statistics, team totals, partnerships, run rates, and over-by-over progress, delivering an engaging and
The system's primary objective lies in its ability to provide real-time updates during live matches. It acts as a
digital scorecard, ensuring accurate and instant dissemination of match information. Fans, spectators, and
cricket enthusiasts can follow the game's progress closely, staying informed about the constantly evolving
match scenarios.
Moreover, beyond the live updates, the Cricket Score Card System functions as a repository of statistical data,
maintaining historical records of matches, player performances, and team statistics. This treasure trove of
information becomes instrumental in post-match analysis, talent scouting, and strategic planning for future
encounters.
6|Page
Flowchart of User Input Handling-
7|Page
CHAPTER – 2
METHODOLOGY
Developing a cricket scoreboard in C language involves several steps that can be broken down into a
methodology. Below is a general outline of how you might approach building a simple cricket
scoreboard:
Understanding Requirements:
Define the scope of the scoreboard (limited overs, test match, T20, etc.).
Identify key features like displaying runs, wickets, overs, batsmen, bowlers, etc.
Determine the data structure required (e.g., arrays, structures) to store information.
Plan the scoreboard layout and how information will be displayed on the screen.
Define structures for storing player details, team information, and match data.
Create arrays or linked structures to manage players' scores, overs, wickets, etc.
Developing Functions:
Write functions for updating scores (runs, wickets, overs), adding players, updating player
information, etc.
Implement functions for displaying the scoreboard, player stats, team scores, etc.
User Interface:
Design the user interface for input (if interactive), such as entering scores, updating overs, etc.
8|Page
Testing and Debugging:
Test the scoreboard with various scenarios (runs, wickets, overs, different match formats).
Documentation:
Create documentation explaining the code structure, functions, input/output format, etc.
Deploy or share the scoreboard for use, ensuring it meets the defined requirements.
9|Page
2.1 EXISTING TECHNIQUE
Creating a cricket scorecard in C involves utilizing data structures, functions, and an organized
approach to track and display match-related statistics. A typical technique involves structuring the
code with proper data models, functions to update scores, and a clear display mechanism to
To begin, a cricket scorecard can be modeled using structures to represent players and teams.
These structures would hold information such as player names, runs scored, balls faced, total runs
for the team, total wickets, overs bowled, and more. Arrays or linked lists can be employed to
manage multiple players and track their statistics throughout the match.
Functions would be written to simulate actions like scoring runs, taking wickets, and updating
match statistics. These functions should handle the complexities of the game, such as calculating
the total runs, wickets, strike rates, and partnerships. Moreover, they should ensure that the data
Displaying the scorecard is crucial. Functions can be created to showcase the match summary,
individual player scores, partnerships, and other essential details. This display mechanism should
present the information in a clear and structured format, making it easy for viewers to understand
Throughout the development process, considerations should be made for error handling, validation
of input data, and an intuitive user interface if interaction is required. This might involve taking
user input for scoring events, updating player details, or inputting match-specific information.
10 | P a g e
.2.1 SOFTWARE REQUIREMENTS
Certainly! Let's delve into the details of the software requirements for developing and running a
C Compiler:
GCC (GNU Compiler Collection): This open-source compiler is widely used for C
programming. It translates your C source code into machine-readable code. On Windows, you
Microsoft Visual C++: This compiler is provided by Microsoft and is often used for Windows
Code::Blocks: A free and open-source IDE that supports multiple compilers, including GCC.
Visual Studio Code: While not a traditional IDE, Visual Studio Code is a highly customizable
Notepad++: A free and feature-rich text editor that is popular among developers.
Sublime Text: A sophisticated text editor known for its speed and versatility.
Operating System:
C is a cross-platform language, so you can develop and run your calculator program on various
11 | P a g e
Terminal/Command Prompt (for Compilation and Execution):
On Windows, you might use the Command Prompt or PowerShell. On Linux, you can use the
terminal.
On macOS, the terminal is available for running commands. Version Control System
(Optional):
Git: A distributed version control system that allows you to track changes in your codebase. It is
Install GCC:
Windows: Download and install MinGW, and ensure that the GCC compiler is selected during
installation.
Linux: Use your distribution's package manager to install the build-essential package, which
includes GCC.
Windows/Linux/macOS: Download Visual Studio Code from the official website and follow
Install Extensions: Open Visual Studio Code, go to the Extensions view (Ctrl+Shift+X), and
12 | P a g e
Open Visual Studio Code, create a new file, write your C code, and save it with a .c extension
Open a terminal within Visual Studio Code or use your system's terminal. Navigate to the
Compile your code using the gcc command Run the executable
By following these steps and meeting the specified software requirements, you can successfully
develop and execute a Calculator Program using the C language. Adjustments may be necessary
13 | P a g e
2.3 PROPOSED METHOD
The provided C program is an implementation of a cricket score card that allows users to
perform various arithmetic operations. Let's break down the key components and
functionalities:
Header Files:
The program includes standard C library header files such as <stdio.h>, <conio.h>, <math.h>,
and <stdlib.h>. These headers provide functions for input/output, mathematical operations, and
program control.
Function Declarations:
The program declares several functions at the beginning, each corresponding to a specific
root).Function declarations ensure that the compiler knows about these functions before they
Main Function:
The main function is the entry point of the program. It uses a do-while loop to repeatedly
display a menu of operations and perform the selected operation until the user chooses to exit
(option 7).
Switch Statement:
The switch statement is used to execute a block of code based on the value of the variable op,
representing the user's choice. Depending on the user's input, it calls the corresponding function
for addition, subtraction, multiplication, division, square, square root, or exits the program.
14 | P a g e
ALGORITHM:
Initialize Structures:
Include attributes like player names, runs scored, balls faced, wickets taken, total runs for the
team, total
Define Constants:
Set up constants for maximum players in a team, maximum overs in a match, and other relevant
parameters.
Write Functions:
Simulate actions like scoring runs, taking wickets, and updating match statistics.
Display the match summary, individual player scores, partnerships, and other essential match
details.
For example, simulate a player scoring runs or getting out, update the team's total runs, overs
bowled, and
Display Scorecard:
15 | P a g e
Implement a function to display the match scorecard.
Display the current score, individual player scores, partnerships, overs bowled, wickets fallen,
and any
Ensure inputs are validated and the system gracefully handles any unexpected scenarios.
Test the scorecard system with various scenarios and edge cases to ensure accurate tracking and
display
of match-related statistics.
Document the code, explaining its structure, functions, input/output formats, and usage
instructions.
Deploy or share the cricket scorecard system, ensuring it meets the defined requirements and
functions correctly.
16 | P a g e
EXPLANATION:
key statistics and performances. In the context of development using the C language, a
cricket scorecard system typically involves organizing match-related data using data
structures like arrays and structures. It captures essential details such as player names,
runs scored, wickets taken, overs bowled, and team totals.Through functions and
algorithms, the system simulates match events like scoring runs, taking wickets, and
updating statistics accordingly. The structure of the code often includes defining player
manipulate anddisplay match data. Functions handle tasks such as calculating totals, strike
player performances, partnerships, and other significant match details. Depending on the
complexity of the system, user interaction elements might be integrated to allow input of
The development process involves meticulous coding to accurately capture and update
match statistics while ensuring error handling and data validation for robustness. The end
goal is tocreate a functional and user-friendly cricket scorecard system that accurately
represents thematch's unfolding events, suitable for tracking and analyzing cricket
17 | P a g e
PROGRAM-
#include <stdio.h>
#include <stdlib.h>
struct batsman
char name[25];
int runs, score, balls, toruns, tobal, ones, twos, threes, fours, sixes;
float str;
} pl1[100], pl3;
struct bowler
char name[25];
int max_w;
float econ;
} pl2[100], pl4;
int main()
int i, n, m;
scanf("%d", &m);
scanf("%d", &pl1[i].ones);
scanf("%d", &pl1[i].twos);
scanf("%d", &pl1[i].threes);
scanf("%d", &pl1[i].fours);
scanf("%d", &pl1[i].sixes);
scanf("%d", &pl1[i].balls);
scanf("%d", &n);
scanf("%s", pl2[i].name);
scanf("%d", &pl2[i].runsgv);
19 | P a g e
printf("Enter the overs bowled by the bowler%d:\n", i + 1);
scanf("%d", &pl2[i].overs);
scanf("%d", &pl2[i].wkttkn);
do
scanf("%d", &choice);
switch (choice)
case 1:
scanf("%d", &plno);
plno--;
printf("= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = =
= = = = = = =\n");
printf("
+ (4 * pl1[plno].fours) + (6 * pl1[plno].sixes);
break;
case 2:
scanf("%d", &plno);
plno--;
printf(" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = =
= = = = = = = = \n");
printf(" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = =
= = = = = = = = = = \n");
21 | P a g e
pl2[plno].runsgv, pl2[plno].wkttkn, pl2[plno].econ);
break;
case 3:
printf(" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = =
= = = = = = = = = = = = = = = = = = = = = \n");
printf("
printf(" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = =
= = = = = = = = = = = = = = = = = = = = = \n");
pl1[i].fours) + (6 * pl1[i].sixes);
pl3.toruns += pl1[i].runs;
printf("\n\n");
printf("= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= =
22 | P a g e
= = = = = = = = = = = = = = = \n");
printf(" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= = = = = = = = = = = = = = = = = = =\n");
break;
case 4:
pl1[i].fours) + (6 * pl1[i].sixes);
pl3.max_run = pl1[i].runs;
pl3.max_six = pl1[i].sixes;
23 | P a g e
}
pl3.max_four = pl1[i].fours;
pl4.max_w = pl2[i].wkttkn;
break;
case 5:
exit(1);
default:
break;
24 | P a g e
} while (choice != 5);
return 0;
25 | P a g e
CHAPTER – 3
24 | P a g e
CHAPTER – 4
CONCLUSION
The development of the Cricket Scorecard in C program has illustrated the fundamentalaspects
of managing and analyzing cricket match data in a digital environment. By utilizing the
capabilities of the C programming language, this project aimed to replicate the functionalities
of a traditional scorecard, facilitating the tracking and visualization of crucial game statistics.
Throughout the implementation, key features such as player statistics management, dynamic
score tracking, real-time visualization, and statistical analysis were addressed. The program
allowed for the input, manipulation, and display of vital match details, enabling users to
monitor the progress of a simulated cricket match and analyze player and team
performances.
scorecard demands further expansion and enhancement. Future iterations could incorporate
score updates, tracking wickets, partnerships, team totals, and sophisticated statistical
analysis.
25 | P a g e
SRI RAMAKRISHNA INSTITUTE OF TECHNOLOGY, COIMBATORE-10
(Approved by AICTE, New Delhi – Affiliated to Anna University, Chennai)
(Accredited by NAAC with ‘A’ Grade and All UG Engineering Programmes are
Accredited by NBA)
I SEM ECE
2 Presentation 35
3 Demo 30
4 Total 100
(A.Jayasmruthi)
Course Coordinator
27 | P a g e