Like Tree5Likes
  • 1 Post By Salem
  • 2 Post By Salem
  • 2 Post By Salem

please i need help in FUNCTIONS

This is a discussion on please i need help in FUNCTIONS within the C++ Programming forums, part of the General Programming Boards category; i have a project as following write c++ program : 1- main function reads two integers 2- min1 function takes ...

  1. #1
    Registered User
    Join Date
    May 2011
    Posts
    2

    please i need help in FUNCTIONS

    i have a project as following
    write c++ program :
    1- main function reads two integers
    2- min1 function takes 2 integer & return minimum
    3- min2 function takes 2 integer & print minimum
    4-min3 function reads two integer & return minimum
    5-min4 function reads two integer & print minimum

    in main function call min1 & min2 for the two entered integers

    in min1 before return statement call min4

    in min4 call min3


    can anyone tell me what can i do for this?
    i have to submit this tomorrow



    thank you

  2. #2
    -bleh-
    Join Date
    Aug 2010
    Location
    somewhere in this universe
    Posts
    460
    Here's the if statement for min, write the functions around that.
    Code:
    if ( x <= y)
        return x; 
    else
        return y;
    "All that we see or seem
    Is but a dream within a dream." - Poe

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,845
    Well you can have a go at writing it I guess.

    I mean, simply inputting two integers in main() ought to be possible, even for you.
    Otherwise, it looks like you're just trying to score free homework with 0% effort.

    > i have to submit this tomorrow
    So you've been sitting on the problem for a few days, and now you're trying to make your emergency our problem?
    umarn0 likes this.
    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.

  4. #4
    Registered User
    Join Date
    May 2011
    Posts
    2
    nimi thank you very much

    Mr. Salem instead of this philosophy you can help , but Make them for yourself

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,845
    NO - do your own homework, or drop the course.
    rags_to_riches and Elysia like this.
    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.

  6. #6
    Registered User inequity's Avatar
    Join Date
    Nov 2010
    Location
    Seattle, Washington
    Posts
    59
    Quote Originally Posted by Kryptonite View Post
    Mr. Salem instead of this philosophy you can help
    hahahahaha

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,845
    My philosophy is simple - it's to keep loser wannabe programmers who think they can scam their way into the workplace, OUT OF THE WORKPLACE!
    rags_to_riches and Raigne like this.
    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. Creating Functions & passing information to other functions
    By RyanLeonard in forum C Programming
    Replies: 4
    Last Post: 10-28-2010, 01:17 PM
  2. Functions calling other functions.
    By kbro3 in forum C++ Programming
    Replies: 2
    Last Post: 12-27-2009, 12:10 AM
  3. Replies: 7
    Last Post: 04-19-2006, 12:17 PM
  4. Replies: 6
    Last Post: 05-06-2003, 04:08 PM
  5. Replies: 1
    Last Post: 01-20-2002, 11:50 AM

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