Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

function c++

#include <iostream>
using namespace std;

// declaring a function
void displayNum(int n1, float n2) {
    cout << "The int number is " << n1;
    cout << "The double number is " << n2;
}

int main() {
     int num1 = 5;
     double num2 = 5.5;
  
    // calling the function
    displayNum(num1, num2);
    return 0;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #function
ADD COMMENT
Topic
Name
6+8 =