0

help plz

everything is fine except when I enter my marks, it ignores all of the first entered markes and replace them with the last one. https://code.sololearn.com/cBuoXDtVeeDK/?ref=app

31st May 2018, 11:53 AM
Rahni Sihem
Rahni Sihem - avatar
6 Respuestas
+ 2
HERE YOU SHOULD CREATE DYNAMIC ARRAY OF MARKS BECAUSE YOU WANT TO STORE MULTIPLE VALUES. BY USING ONLY VARIABLE NAMED MARK , PROGRAM ONLY STORE ONE MARK I.E. LAST MARK USER HAD ENTERED. EXAMPLE OF DYNAMIC ARRAY : https://code.sololearn.com/cJZIB0g7ZcSG/?ref=app
31st May 2018, 12:24 PM
Meet Mehta
Meet Mehta - avatar
+ 2
DECLARE THIS ARRAY IN STRUCT. DECLARE int n AND THAN int marks[n] instead of marks.
31st May 2018, 12:47 PM
Meet Mehta
Meet Mehta - avatar
+ 2
REMOVE PRINT STATEMENT IN FIRST FOR LOOP AND PLACE IT ABOVE FOR LOOP TO MAKE CODE LOOK NICE. BECAUSE EVERY TIME USER ENTER MARK IT WILL BE PRINTED.
31st May 2018, 1:19 PM
Meet Mehta
Meet Mehta - avatar
0
MEET MEHTA thank u, ur method is easier :) but our teacher asked us to do it with struct fonction and i don't even know if it's possible or not.
31st May 2018, 12:37 PM
Rahni Sihem
Rahni Sihem - avatar
31st May 2018, 1:05 PM
Rahni Sihem
Rahni Sihem - avatar
0
Done! thank u so much 😍
31st May 2018, 1:22 PM
Rahni Sihem
Rahni Sihem - avatar