0

What are the errors of my code?

#include <iostream> using namespace std; int hitung() { int hitung(int pertama,int kedua) { return pertama + kedua; } void main() { cout << hitung(10,15); } }

3rd Feb 2019, 10:55 AM
Achmad Imannudin
Achmad Imannudin - avatar
3 Answers
+ 5
This is how it should be written : ) #include <iostream> using namespace std; int hitung(int pertama, int kedua) { return pertama + kedua; } int main() { cout << hitung(10,15); return 0; }
3rd Feb 2019, 11:18 AM
Ipang
+ 3
You're welcome, happy coding 👍
3rd Feb 2019, 11:20 AM
Ipang
+ 1
Thanks you very much
3rd Feb 2019, 11:19 AM
Achmad Imannudin
Achmad Imannudin - avatar