+ 5
why this code show errors
please tell me how to fix this error https://code.sololearn.com/cfzDU00C380d/?ref=app
6 Réponses
+ 3
you redeclare the variables x y z
in line 6 erase the codes on line
6,8 and 13
then in the main function write the code
cout<<average(2,3,7);
then your code will be fine
here is the correct code
https://code.sololearn.com/c32ZHTbZSWJ1/?ref=app
+ 4
You alerdy declared x,y,z as parameter so you can't redeclare it inside the func
also use:
cout<<average(x,y,z);
instead of int average(x,y,z);
+ 2
Erase line number 6 .. There is a multiple declaration of x,y,z variables
write.
cout << average (2,3,7)
+ 1
https://code.sololearn.com/cYeyDKtay1P2/?ref=app
Made some edits here , its working now.
outputs : the average is 3.
0
delete int x,y,z;
and int before function
avrage(2,3,7)