+ 1

Any error in this code

#include <iostream> using namespace std; class addition { public: int add(int x, int y) { int z; z=x+y; cout << z << endl; return(z); } }; int main() { addition sum; sum.add(6,7); }

23rd Nov 2017, 11:44 AM
Deep Prakash Goyal
Deep Prakash Goyal - avatar
2 Answers
+ 1
I don't think so. But you should check it yourself in Code Playground.
23rd Nov 2017, 12:15 PM
DAB
DAB - avatar
+ 1
What is your question? it works perfectly
23rd Nov 2017, 12:17 PM
Light
Light - avatar