little start c program

 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions little start c program
# 8  
Old 09-30-2009
Should
Quote:
give how many chambers in a constant number.
be
Quote:
given how many chambers in a constant number.
Code:
#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...
# 9  
Old 09-30-2009
my english isn't to good
ik don't no how tot start i think with dis i can build the programma
# 10  
Old 09-30-2009
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.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
# 11  
Old 09-30-2009
Quote:
Originally Posted by jim mcnamara
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.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Seems our English isn't too good either. This is the homework forum!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Start program depending on processor workload

Hi community, I'm looking for a script/code which starts a shell script with a MPI process depending on: a) the processor workload, i.e. if the workload falls below a certain limit b) alternatively if the previous process finished, e.g. if a process ID disappears I need this for... (3 Replies)
Discussion started by: heunigreenfreak
3 Replies

2. Shell Programming and Scripting

Bash script to start program and answer prompts?

I'm trying to write a script the simplifies the execution of a program: After starting the program (sh ~/.mfix/model/make_mfix) I am prompted four times for options: Do you need SMP version? (y/n) Do you need DMP version? (y/n) Do you need debug version? (y/n) Force re-compilation of... (2 Replies)
Discussion started by: lanew
2 Replies

3. Fedora

[Solved] Unable to start Matlab program

hello everyone, I have Matlab installed on Fedora 16. I tried running it by simply typing on terminal: $ matlabBut it returned the follwoing error: --- can anyone suggest a solution? cheers, peter ---------- Post updated at 10:57 PM ---------- Previous update was at 10:54 PM ----------... (1 Reply)
Discussion started by: peter_071
1 Replies

4. OS X (Apple)

A program crashed my iMac so bad that it could not start up.

Hi, Solid as a rock or ... Is it possible for a program to damage an iMac (Snow Leopard) so bad that it cannot start up again, and need to be repaired? I am asking about this, because this seems to have occurred two days ago, when I was running a popular game program. When I closed the... (6 Replies)
Discussion started by: ASL123
6 Replies

5. Shell Programming and Scripting

Start program in background (or start crontab ahead of time)

Hey! I'm working on a script that will add a user, create some configfiles, and add a crontab for the user. The crontab looks like the following: @reboot /home/user/program config.conf & I would like for this process to start at the end of my script under the corresponding username by... (0 Replies)
Discussion started by: noratx
0 Replies

6. Programming

How to start a process in linux using C program??

I have a set of attributes such as group id,group name,etc related to a linux process. Iwant to know how to start a process in linux using C program.Plz do help me. (3 Replies)
Discussion started by: vigneshinbox
3 Replies

7. Solaris

Error in Solaris installation over WAN(unix: Could not start init) Program terminated

I am trying to install Solaris 10 on a target machine which is t1000. ( sun4v). I have configured my jumpstart server to install solaris over WAN. when i boot my machine, the wanboot image gets downloaded properly, miniroot gets downloaded properly, but after that the process fails with the... (3 Replies)
Discussion started by: hemalsid
3 Replies

8. Shell Programming and Scripting

start a program with other user's permission

I have some of programs in unix system which are to started with one_user say "xxxx". I have sudo permission if i start these programs with sudo it shows root permission. But i want these programs permession should be "xxxx". I tried "su user_name -c Program_name" but it is not... (3 Replies)
Discussion started by: srikanthus2002
3 Replies

9. Shell Programming and Scripting

How can I make a program start up automatically after the computer restart/startup?

hi all How can I make a program start up automatically after the computer restart/startup in fedora? something like: ... Establish a shell then run some of command code. Thanks for Help!! (1 Reply)
Discussion started by: munna_dude
1 Replies

10. UNIX for Dummies Questions & Answers

How do I start a program when I start my Computer?

I'm running MAC OS X and I'm wondering how I start 'nixey programs (not normal apps) on startup? Things like the dnet client and hxd Hotline Server. Anyone know? (1 Reply)
Discussion started by: l008com
1 Replies
Login or Register to Ask a Question