FUNCTIONS
#include
using namespace std;
int add(int x, int y)
{
int f=x+y;
return f;
}
int main()
{
int b=0;
int c=0;
int a=0;
cout<<"Input two numbers to be added.\n";
cin>>b;
cin>>c;
a=add(b,c);
cout<<"The answer is "<< a<<".\n";
}
OK, so either it has absolutely no problems, it got ruined by the server, or you're compiler needs replacing.
2 comments:
ok. this stupid HTML got rid of iostream, but other than that, I got it to keep the << a<< by cleverly spacing it.
basically everything < stuff > is considered an HTML tag. :( I'd like to know how to get rid of that, or figure out the HTML equivalent of
/*
stuff
srhnarxf
*/
Post a Comment