Whats the problem in this code the error shows me this

source.cpp: In function β€˜int main()’:
source.cpp:4:39: error: a function-definition is not allowed here before β€˜{’ token
4 | void convert(int ll,int ul,int step) {
| ^

and my code is

  #include<iostream>

using namespace std;
int main() {
void convert(int ll,int ul,int step) {
for (int i =ll; i<=ul; i=i+step){
int c = (int)(5.0/9)(i-32);

cout<<i<<"\t"<<c<<endl;

}

}
return 0;

}

Hey @Code share your code using ide.codingblocks.com, if you don’t know how to do that. You can ask me that too i would help you in it too.

You were doing it in a wrong way, follow this for correct format

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.