954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

create game with 10 rounds in C

im creating a simple game and i want it to have continous 10 rounds . but i dont have any idea , im not allowed to use looping .tnx

theCompiler
Light Poster
31 posts since Jul 2011
Reputation Points: 10
Solved Threads: 0
 

OK, this is the part of the help where YOU help US understand WTF you want. We weren't in the classroom, or heard the lecture, or read the text, or even know the teacher.

First - find out what you want to do. Your info here just isn't enough to start talking about a C program.

Second - Get started on it. You need more than idea's, you need pseudo code and at least the bare skeleton of a C program. Put some work into it, and THEN post it, and ask your specific questions.

You'll need to do SOME kind of looping. You don't have to use standard C loops, but some looping logic (perhaps by a call and return of a function), will be needed.

I'd suggest the game have simple rounds if you need to have 10 of them.

Adak
Nearly a Posting Virtuoso
1,479 posts since Jun 2008
Reputation Points: 425
Solved Threads: 185
 

Not using looping could mean recursion or goto label, depending on definition.

pyTony
pyMod
Moderator
5,359 posts since Apr 2010
Reputation Points: 782
Solved Threads: 852
 
Not using looping could mean recursion or goto label, depending on definition.

Or you could just put one "round" in a function, and call it 10 times explicitly, returning any information you need to track across the whole game.

gusano79
Posting Pro
519 posts since May 2004
Reputation Points: 182
Solved Threads: 77
 

When I read this the first thing that came to mind was---decision structures:

if()

else

Jamblaster
Newbie Poster
7 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 
int game;
printf("round one");
.
.
. //other game stuff
printf("round two");
.
.
. //round 2 stuff

Thats the most obvious way to do it.

sergent
Posting Pro
598 posts since Apr 2011
Reputation Points: 70
Solved Threads: 22
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You