0

Why did it show error?

#include<iostream> #include<conio.h> using namespace std; void addition (int , int ); void subtraction (int, int); void multiplication(int, int); void division(int, int); int main() { addition (10,3); subtraction(10,3); multiplication(10,3); division(10,3); getch(); } void addition (int a , int b) { int sum= a+b; cout<<"sum= "<<sum<<endl; } void subtraction(int a, int b); { int result= a-b; cout<<"subtraction = "<<result<<endl; } void multiplication (int a , int b) { int result= a*b; cout<<"multiplication= "<<result<<endl; } void division (int a , int b) { int result= a/b; cout<<"division= "<<result<<endl; }

22nd Sep 2022, 5:34 PM
Md. Mahfujul Karim
4 Answers
+ 4
Please LINK your code instead of pasting it into the description. READ THE ERROR MESSAGE. There is a ";" after "void subtraction(...)" In case you want to run it on sololearn, remove conio.h and getch()
22nd Sep 2022, 5:42 PM
Lisa
Lisa - avatar
0
Can anybody help me please
22nd Sep 2022, 5:34 PM
Md. Mahfujul Karim
0
Link your code
22nd Sep 2022, 7:10 PM
Abhimanyu
0
Okay I got it. First get rid of conio.h and getch. Then remove the semicolon after void subtraction
25th Sep 2022, 6:35 PM
Abhimanyu