First, identifiers must be declared before they're mentioned. So either move the definition of say_hello() to before main() or forward declare it.
Second, if you're using a global variable to pass data between functions, you don't require parameters. You must use an empty parameter list. However, globals aren't very friendly as your programs get bigger and you can't tell which functions change their state. You should use an int as parameter and get rid of the global variable, like this:
1 2 3 4
|
int say_hello(int times)
{
// function body
}
|
Third, this is just a convention really, but typically you'd use
i as the identifier for a loop counting variable. It's short, it's very common, and pretty soon it's second nature.
Finally, this is just an opinion, but I really recommend you stay away from "Hungarian notation". Whenever you use a variable, you should know what type it is, otherwise why are you using it if you don't know what it's for? The original point of "Hungarian", as described in Charles Simonyi's famous paper, was to indicate something the type system couldn't deal with, such as the difference between rows and columns (both integers) and so on.