0% found this document useful (0 votes)
14 views6 pages

Individual Report-C - 23IR008

It is an individual report using c program

Uploaded by

2843prad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views6 pages

Individual Report-C - 23IR008

It is an individual report using c program

Uploaded by

2843prad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

C-Programming Laboratory

Individual Report
Cricket Scoreboard

23IR008
Mukund DIlip Krishna
Aim:
To display the scores of a cricket match with the use of C.

Introduction:

C is a general-purpose programming language created by Dennis Ritchie at the Bell


Laboratories in 1972. It is a very popular language, despite being old. The main reason
for its popularity is because it is a fundamental language in the field of computer
science. C is strongly associated with UNIX, as it was developed to write the UNIX
operating system.

Historically, the Cricketing era began in the 16th century. But formally, the cricket
scoreboard’s history was traced to keeping score in the 18th century. In early games,
players often kept a record of their scores. However, around the mid-1700s, manual
scorecards were introduced.

Because of manual scoring, it has become easier to keep records and analyze the
score.
The Early Days: Manual Scoreboards and their Impact on Game Dynamics and
Strategy
In the beginning, scoreboards were manual.
● Someone had to update the scores by hand.
● These scoreboards were simple but very important.
● They provided vital information to both players and fans.
● It impacted how the game was played and enjoyed.
● Players can see their scores and adjust their game dynamics and strategy.
● Fans can quickly follow the game’s progress, making the experience more
exciting.

The Evolution of Cricket Scoreboards


Cricket scoreboard history has changed a lot over time:
● Manual Scorecard: provided more accurate record-keeping.
● Mechanical Scoreboard: Introduced in the late 19th century, using pulleys and
levers to update scores.
● Electronic Scoreboard: This came about in the mid-20th century, providing faster
and more precise updates.
Application used:
CodeBlocks is a free open-source, cross platform Integrated Development
Environment(IDE) for programming:
● Features: Supports many compilers, including GNU GCC (MinGW and Cygwin)
and MS Visual C++. It also supports interactive debugging via GNU GDB or MS
CDB.
● Languages: Supports a variety of languages, including C/C++, Java, Python,
HTML5, Objective C, PHP, Ada, Fortran, and Assembler.
● Plugins: Built around a plugin framework, so it can be extended with plugins to
add functionality. For example, plugins can provide event compiling and
debugging functionality.
● License: Released under the GNU General Public License 3 (GPL).
● Platform: Available for Windows, Linux, and MacOS.
● Consistency: Designed to have a consistent look, feel, and operation across
platforms.

Algorithm:
Start
Input Team Name

● Prompt the user to enter the team name.


● Store the input in a string variable teamName.

Input Match Details

● Prompt the user to enter the number of overs played.


● Store the input in an integer variable overs.
● Prompt the user to enter the number of wickets fallen.
● Store the input in an integer variable wickets.

Initialize Player Data

● Create a structure Player to store details of each player:


○ name (string): Player's name.
○ runs (integer): Runs scored by the player.
○ balls (integer): Balls faced by the player.
● Create an array of Player structures for up to 11 players (MAX_PLAYERS).

Input Player Details


● Loop through the array of players (i from 0 to MAX_PLAYERS - 1):
○ Prompt the user to enter the player's name.
■ If the user enters "end", break the loop.
○ Prompt the user to enter the runs scored by the player.
○ Store the input in the player's runs.
○ Prompt the user to enter the balls faced by the player.
○ Store the input in the player's balls.
○ Add the player's runs to a cumulative variable totalRuns.

Display the Scoreboard

● Print the team name, total overs, total wickets, and total runs.
● Print a formatted table with player details (name, runs, and balls).
● Loop through the array of players and display each player's data if the name is
not empty.

End
Code:
Output:

Result:
The scores of the cricket match have been displayed with the use of C.

References:
1. https://www.yashisports.com/cricket-scoreboard/#:~:text=Cricket%20scoreboards
%20are%20important%20for,wickets%20taken%2C%20and%20overs%20bowle
d.
2. https://www.w3schools.com/c/c_intro.php

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy