+ 2
Helpđ
I don't understand, where is wrong? I'm learning it just for 2 daysđđ https://code.sololearn.com/cuUsi55UST1r/?ref=app
1 Answer
+ 1
The problem is that you're trying to create a function without actually declaring it, leaving just the curly brackets there. If you want it to work, you could try setting the function as an int and give it a name and call it from int main.
It should look something like this:
int main() {
cout << "Sololearn \n is the best app!"<<endl;
/*this is just for practice*/
cout << "Agree?";
name();
return 0;
}
//now try to sum:)))
int name(){
int i=100;
int g=1;
int sum=i+g;
cout << sum;
return 0;
}
Hope this helped!