1) Hafizul Rahman bin Mohd Sahimi ( 134355 )
2) Wan Hanafi bin Wan Hussain ( 134207 )
3) Muhammmad Aidid Wafi bin Nordzi ( 131732 )
4) Mohammad Aminuddin bin Endut ( 131469 )
This blog is presenting about the tutorial for creating a simple programming using Programming in C such as data type, arithmetic structure, repetition structure (while loop, do-while loop, for loop, pre/post-test loop, and nested loop) and Function in C. This project is attempt to create a simple gaming program based on C++ language programming. Programming is the process of writing , testing, debugging, and maintaining the source code of computer programs. To initiate the program, user need to compile and execute the program using Bloodshed Dev-C++ compiler. Download here.
The user of the program is two different players who participated in the game that need to insert user data. User can do exercises by answering the questions and scoring the possible highest mark.. This program is created to determine which player score the highest mark .
Beginning of the program
User can start the program by choosing any category. (1) for Exercise, (2) for Tutorial, (3) Competition. Then, user need to insert the name for user data.
This is example for Exercise, user need to answer all 10 question to get possible highest score.
This is example for Tutorial, user will be provided the questions with answer so that they can practice the question for Competiton category. Practices make perfect.
Game Begins !
Now we're in Competition category, this requires two different player to answer the question separately.
1st player
Game Result !
The result is player 2 winning the game as he score the highest mark with 7 answer correct
This is simple flowchart to picture the scenario of the game
This picture below is an example for gaming coding using C++ language
To start the coding, we need to create user-defined function and built in function
1) function call
2) function prototype
3) function definition
4) built in function
5) naming the array
To seed the question randomly, we need an input of the random number generation,
( randNo = min + rand( )%( max - min + 1); in function definition.
Here is the example of game coding
Last but not least, may this tutorial helps to create such gaming program.






It is fun and exciting to learn game programming. I really wanted to learn it.
ReplyDelete