创建简单的功能

int squareNum (int a) {
    return a*a;
}

int :返回类型

squareNum :功能名称

int a :参数类型和名称

return a*a :返回一个值(与开头定义的返回类型相同)

StackOverflow 文档