Click here to Skip to main content
15,846,976 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Write a program in C++ that can be used to read in two integers values through the keyboard, pass them as parameter to a function named sum() and computes their total and returns their result which is then output appropriately.
Updated 13-Aug-10 22:25pm
Emilio Garavaglia 14-Aug-10 3:46am    
Reason for my vote of 1
Sandeep Mewara 14-Aug-10 3:53am    
Reason for my vote of 1
1. No Effort
2. Homework

CodeProject doesn't do homework. But if we did, it would probably be the best homework in the world.
Share this answer
It does not work like this here.

Here is what is expected by enquirers:
1. TRY first what you want to do!
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.
Share this answer
Int sum(int,inti);
Int main()
Int x,y,add;
Cout"The sum is:"<<add<<endl;
Return 0;
Int sum(intx,inty);
Return y;
Share this answer
Niklas L 14-Aug-10 8:12am    
C++ is case sensitive. Int is not the same as int. Looks like you used Microsoft Word as editor.

What exactly is your question here? Specify a question, and you are likely to get an answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900