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; }
4 Antworten
+ 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()
0
Can anybody help me please
0
Link your code
0
Okay I got it.
First get rid of conio.h and getch.
Then remove the semicolon after void subtraction