c++ beginner s3-function

function

// main.cpp
#include <iostream>
#include "utils.h"
using namespace std;

int main() {

    greeting();
    int result = plue_one(1);
    cout << result << endl;

    return 0;
}

void greeting() {
    cout << "Hello" << endl;
}

int plue_one(int num) {
    num++;
    return num;
}

header

Last updated

Was this helpful?