i wil make the next mission:
give how many chambers in a constant number. use an array which chamber is free and count how many chamber there are free. make also something to test
I don't now how to start. I need an little example so i can make the mission
#include <stdio.h>
#define NUM_ROOMS 6
int main(void)
{
int rooms_free[NUM_ROOMS];
rooms_free[0]=0;
rooms_free[1]=1;
if(rooms_free[0])
printf("Room %d is free\n", 0);
else
printf("Room %d is not free\n", 0);
// etc.
}
There's your array of free chambers and how to use it to start with...
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.
Please review the rules, which you agreed to when you registered, if you have not already done so.
More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.