Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 13

A NUMBER GUESSING GAME IN C

AS
ENGINEERING EXPLORATION PROJECT

Submitted by

ADABALA ABHI RAM NAIDU (19EM1A0566) AKETI VISWANADH(19EM1A0567)

BALUSU SUJATHA (19EM1A0568) BONAM SAI DHANA SRI(19EM1A0569)

BUSI NIRMALA KUMARI(19EM1A0570) CHAMAKURI ASRITHA(19EM1A0571)

Under the guidance of


Mr. M.N.V.L.NARAYANA M.Tech.
Associate Professor, CSE DEPT..
ABSTRACT

A number guessing game is based on a concept


where player guess a number between a range.
If player guess the exact number then player
win else player loose the game. Since this game
provides limited attempts, so, player must
guess the number with the limited attempts,
else will lose the game.
CONTENTS
INTRODUCTION
SOFTWARE SYSTEM ANALYSIS
SOFTWARE SYSTEM HIGH LEVEL DESIGN
SOFTWARE SYSTEM LOW LEVEL DESIGN
SOFTWARE SYSTEM IMPLEMENTATION(CODE)
SOFTWARE SYSTEM UNIT (OR CODE) TEST
CONCLUSION
REFERENCES
INTRODUCTION
Let's play a little game to give you an idea of how
different algorithms for the same problem can
have wildly different efficiencies. The
computer is going to randomly select an
integer from 1 to 100. You'll keep guessing
numbers until you find the computer's number,
and the computer will tell you each time if
your guess was too high or too low.
SOFTWARE SYSTEM ANALYSIS
Functional Requirements:
Number guessing game Rules
1. You must enter only valid integer within the specified range.
2. You will be provided limited attempts to guess the number.
You cannot leave the game, once started If the entered number is less than or greater than the
Require number, then player gets the message (hint) to proceed further either in up or down
range.

NON FUNCTIONAL REQUIREMENTS to run a number guessing software system:


HARDWARE REQUIREMENTS:
Processor : Pentium–IV
RAM : 4 GB(min)
Key Board : Standard Windows Keyboard
Hard Disk : 20 GB
Mouse : Two or Three Button Mouse
Monitor : SVGA
OTHERSOFTWAREREQUIREMENTS:
Operating System : Windows XP
Coding Language : TURBO C
SOFTWARE SYSTEM DESIGN

Software System HIGH LEVEL DESIGN : (Flowchart)


SOFTWARE SYSTEM LOW LEVELDESIGN
(Algorithm)
Algorithm for Number guessing game:

Step 1: Create three variables attempt, user Guess Number, Secret Number and
initialize them.

Step 2: Generate a random number and assigned to secret Number.

Step 3: Start a loop and take user input.

Step 4: Validate user input and match with the secret Number.

Step 5: If user Guess Number is greater than or less than the secret Number then print
a message to user.

Step 6: If user Guess Number is equal to the secret Number, then user wins and exit
the game.

Step 7: If number of attempts exceeds the limit, exit the game.

Step 8:Repeat from Step 3.


SOFTWARE SYSTEM
IMPLEMENTATION:(Code)
Software System Source Code:
#include <stdio.h>
#include<stdlib.h>
#include<time.h>
int main()
{
int num, guess, tries = 1;
srand(time(0)); /* seed random number generator */
num = rand() % 100 + 1; /* random number between 1 and 100 */
printf("Guess My Number Game\n\n");
printf("Enter a guess between 1 and 100 : ");
scanf("%d", &guess);
while (tries<=3)
{
if (guess > num)
{
printf("Too high!\n\n");
tries++;
}
else if (guess < num)
{
printf("Too low!\n\n");
tries++;
}
else
{
printf("\nCorrect! You got it in %d guesses!\n", tries);
break;
}
}
if(num!=guess)
{
Printf(“\n Sorry! You did not get the answer. The correct number is%d \t”, num);
}
return 0;
}
SOFTWARE SYSTEM UNIT
(OR CODE) TEST:
Guess My Number Game

Enter a guess between 1 and 100 : 60


Too low!

Enter a guess between 1 and 100 : 80


Too low!

Enter a guess between 1 and 100 : 95

Correct! You got it in 3 guesses!


CONCLUSION
project means a lot of experience. In this section we summarize the experience gained by project team during
development of “GUESSING MY NUMBER”.
The Obstacles:
1. Working with game engine completely a new experience for us. Normally we are working with C languages.
2. We adopt these things by video tutorials, text tutorials, internet and learning materials given by the tools
themselves. It's a matter of time, patience and hard work.
3. It is very sensible work and it demands much time because the game engines try to connect game environment
with the real world.
4. Creating a 3d model is very difficult because you need to work with each and every point of the model.
5. The Exists game engines demands vast knowledge about its properties, sections and sub-sections. After all the
thing is that a game project is not a project of 6 or 8 months for three people!
The Achievements
1. Now we know much more about game engines. How it works?
2. We know how a model is constructed and how it is animated.
3. Co-Operation between group members.
4. Develop communication skills
6. Growing creative thinking and imagination capability.
Future Plan
 Level Extension
 Improve Graphical Representation
 Introduce new game features
 Introduce new environment and scenes
 Take user response through website and produce web rank list .
REFERENCES
1. http://www.mixamo.com/,
2. http://thefree3dmodels.com/stuff/
3.http://library.creativecow.net/articles/3dsmax.html,
4.http://www.good-tutorials.com/tutorials/3ds-
max/animation
5.Software Evaluation – A Product Perspective by
Infosys
6.Software Engineering in Games by BalazsLichtl and
Gabriel Wurzer from Institute of Computer
Graphics, Technical University of Vienn.
ANY QUERIES?
THANK YOU!

You might also like