Return a double variable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thatgu
    New Member
    • Mar 2010
    • 3

    Return a double variable

    I was making a funtion that done some maths and returns a double signed variable with decimal places and I wanted to use return to let me use i once more in the Main function

    Basicly can you make return work with a double variable
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Yes just declare your function as returning double

    Comment

    • donbock
      Recognized Expert Top Contributor
      • Mar 2008
      • 2427

      #3
      For example, take a look at <math.h>, It contains a lot of functions that return a double.

      Comment

      • thatgu
        New Member
        • Mar 2010
        • 3

        #4
        EDIT ooooh insted of int(function name)
        it is double(funtion name)
        ty for all of you help

        Comment

        Working...