Hello . I'm in school right now but i'm trying to learn c++ , and i really want to make something for myself and maybe my friends . What i want it to do is basically arithmetic mean but with a twist .
Example .
Grade 1 = 5
Grade 2 = 5
Grade 3 = 5
Grade 4 = 5
Grade 5 = 5
Exam = 6
5+5+5+5+5=25 /// 25/5=5 /// 5*3=15 /// 15+6=21 /// 21/4=5.25 . Final answer 5.25
What i want it to do is grade 1 + grade 2 + ... + grade 5 = x
x=x/(The number of grades)
x*3+exam/4=r
cout r . What i can't do is have different amouts of grades for example . i have 5 grades but he has 7 and she has 4 . But i can only make for a certain amount . This is not homework is just something i want to do to and i have no idea how . I'm really a beginner so if you don't want to tell me the exact thing help me understand how to make it . Thank you so much <3 .
i'm a bit stupid lol . Sorry for that . I Was sure i made a mistake somewhere i just didn't notice . i thought it was obvious but it isnt . yeah what i want is (x*3+exam)/4