Da_Gamer icon

Function Example 4

Da_Gamer | PRO | 12/19/16 07:19:17 PM UTC | 0 ⭐ | 287 👁️ | Never ⏰ | []
C++ |

330 B

|

None

|

0 👍

/

0 👎

#include <iostream>
#include <stdlib.h>
 
using namespace std;
 
int returnFive()
{
    int five = 5;
    return five;
}
 
int returnFiveDoubled(int value)
{
    return value * 2;
}
int main()
{
    int newValue = returnFive();
    int doubledValue = returnFiveDoubled(newValue);
    cout << doubledValue << endl;
    return 0;
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎