Thread: Man, I'm on a windows machine

  1. #1
    student1
    Guest

    Man, I'm on a windows machine

    Ok,
    I haven't used this computer and happen to be doing homework on it right now. It's a nt machine and I know how to log in, but I have never used the text editor on this in a while.

    here are some sample commands, I have x-session, but I think I have tel-net with which to send the homework.

    we use commands like gcc to compile and a.out to run the program. here are some sample commands, man I don't know how to even get into this system to work with my file.
    Please add the following line to the end of your .cshrc file to make gcc work:
    " source /usr/ui/class/aux/gcc_setup
    Log out
    Log back in.
    If you are unsure about doing this, please see one of the TA's for help.
    If you get a message like this AFTER completing the above instructions:

    gcc: SB error: cannot find exe /usr/local/bin/gcc
    please see the TA as soon as possible."

    I also have this homework problem, and it seems like I need to have a "for" loop for this one here it goes:

    "Problem 4.14 from the Deitel and Deitel textbook modified as follows. The program should take a single integer as input for the number of values to include in the table. When the table is complete, the user should be asked for a value again so that they may print a new table. If the value that is entered is -1 (the sentinel) the program should stop. "

    Problem 4.14 reads like this: I want to make a program that calculates the factorial for a number, and need to print the results in tabular format. Here are some results of what it supposed to print out like after you enter a number


    1 1
    2 2
    3 6
    4 24
    .... and so on... and I need to make a case for when the user puts in 0.

    Man, I'm sorry for comming so late. I did work on it yesterday, this is my 6th class and I never learned C programming before and we are in the 4th chapter so I will cut myself some slack cause I have 3 other engineering classes. this is the pits. anyone who has the sympathy to help, I would appreciate it. I came here before too. I'm John

    Now I'll see how to log into this system

  2. #2
    student2
    Guest
    wait, is there a factorial function in C? My teacher said their wasn't, but this "Sams" book I have shows one for it in an example. Weird.

  3. #3
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    They probably wrote one. AFAIK, there's no factorial function built into C.

    Oh, and I'm pretty sure that 0! is 1.

  4. #4
    student1
    Guest
    how did you all get so good at C, I bet some of you have been doing it for a while, but this sucks when I have to learn in a graded system. less fun!, but I can still have it.
    thanks,

  5. #5
    student1
    Guest
    where can I learn how to use a windows machine for my program.? I am so basic, this is sorry. This is my first week of programming, give me a break.

  6. #6
    Code Warrior
    Join Date
    Nov 2001
    Posts
    669
    The Govt is right. 0! = 1.
    Current projects:
    1) User Interface Development Kit (C++)
    2) HTML SDK (C++)
    3) Classes (C++)
    4) INI Editor (Delphi)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 04-29-2006, 01:35 AM
  2. Menu Item Caption - /a for right aligned Accelerator?
    By JasonD in forum Windows Programming
    Replies: 6
    Last Post: 06-25-2003, 11:14 AM
  3. Windows Rant followed by installation question
    By confuted in forum A Brief History of Cprogramming.com
    Replies: 12
    Last Post: 06-21-2003, 04:42 PM
  4. Codec Bitrates?
    By gvector1 in forum C# Programming
    Replies: 2
    Last Post: 06-16-2003, 08:39 AM
  5. Windows logons and other misc annoyances
    By Imperito in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 03-10-2002, 10:00 PM