Source Code needed

This is a discussion on Source Code needed within the C Programming forums, part of the General Programming Boards category; Hi Guys! I m vry new 2 C programming. I've a little part of C included in my studies. for ...

  1. #1
    Registered User usmankhan's Avatar
    Join Date
    Jul 2007
    Posts
    2

    Source Code needed

    Hi Guys!

    I m vry new 2 C programming. I've a little part of C included in my studies.
    for now i want a programm written in C (not C++) that repeatdly ask 4 a number and calculates its factorial. the programm terminates if 0 is entered.
    Plz help me out.

  2. #2
    Fear the Reaper...
    Join Date
    Aug 2005
    Location
    Toronto, Ontario, Canada
    Posts
    625
    You should read the forum guidelines before you post, and then you might realise that the people here aren't code monkeys.

    We're here to help you, not do your work. So provide us with an attempt and we'll tell you if and where you went wrong.
    Teacher: "You connect with Internet Explorer, but what is your browser? You know, Yahoo, Webcrawler...?" It's great to see the educational system moving in the right direction

  3. #3
    Registered User
    Join Date
    Jul 2007
    Posts
    36
    I'm a code monkey!
    FrancoisSoft
    FrancoisSoft on the Web
    If you stare at a computer for 5 minutes you might be a nerdneck.

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    835
    It looks like usmankhan and nio are the same person, creating different identities and posting one homework question for each one. Unfortunately, he got a sucker to do the other one for him.

  5. #5
    Registered User
    Join Date
    Jun 2007
    Posts
    63
    Even what you say is valid, we may help him by giving him some instructions.

    Well, try firstly writing a function which will calculate the factorial.

    It will look like something like that:

    int Factorial(int n);

    Later we discuss it.

  6. #6
    Fear the Reaper...
    Join Date
    Aug 2005
    Location
    Toronto, Ontario, Canada
    Posts
    625
    Well, for those who don't mind giving away answers to people who do not even have the slightest desire to learn, feel free to do so. Realise, though, that by doing so :

    1) You will not be compensated.
    2) You likely will not be credited.
    3) You will not be helping anyone.

    If you are comfortable with the following, code away.
    Teacher: "You connect with Internet Explorer, but what is your browser? You know, Yahoo, Webcrawler...?" It's great to see the educational system moving in the right direction

  7. #7
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,592
    > Even what you say is valid, we may help him by giving him some instructions.
    Yes, but until the poster posts some code, it's impossible(*) to pitch the advice at the level which might be most beneficial to them.

    (*) Actually, it's the Goldilocks problem in that any explanation would be
    - too easy
    - too hard
    - just right
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 01-18-2008, 06:05 PM
  2. Documenting Source Code
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 01-04-2008, 11:18 AM
  3. Source code needed
    By siavoshkc in forum C++ Programming
    Replies: 17
    Last Post: 02-20-2006, 09:16 PM
  4. Lines from Unix's source code have been copied into the heart of Linux????
    By zahid in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 05-19-2003, 03:50 PM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21