I want help to fix errors. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

I want help to fix errors.

Help please i made program to calculate average but it showing errors https://code.sololearn.com/ckek66cwEt7V/?ref=app

14th Nov 2020, 4:45 PM
Om Sri
5 Answers
14th Nov 2020, 6:44 PM
CHERIEF Houcine Abdelkader
CHERIEF Houcine Abdelkader - avatar
+ 2
CHERIEF Houcine Abdelkader why it showing no output
15th Nov 2020, 1:44 AM
Om Sri
+ 1
You can access struct values by its object, not as single variable.. Like student std; //struct object creation.. std.maths //access its variables.. std.phy= 98.5; And you have no connections to the functions from main function so it's no use of functions.. Function closing is not in proper way.. Missing close brace.. And parameter declaration is also wrong.. It's a incomplete program.. 🐍🐍🐍🐍🐉 Try these changes : => Declare all functions and structure before using those in statements.. => sample proper way : void findfirst(student St){ string sname = St.name; cout<<sname; } =>Add a return statement in Avg function.. =>add calling statements of these functions from main function.. Try these and reply if you need further any..
14th Nov 2020, 6:19 PM
Jayakrishna 🇮🇳
+ 1
This is you're program, you can output what do you want. I've just corrected from syntax errors!!
15th Nov 2020, 7:52 AM
CHERIEF Houcine Abdelkader
CHERIEF Houcine Abdelkader - avatar
0
Try to edit to corrections which I mentioned in my previous post.. It works with those modifications....
15th Nov 2020, 9:04 PM
Jayakrishna 🇮🇳