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
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
+ 2
DECLARE THIS ARRAY IN STRUCT.
DECLARE int n AND THAN int marks[n] instead of marks.
+ 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.
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.
0
i got it !! 😁 thank youuu
https://code.sololearn.com/cBuoXDtVeeDK/?ref=app
0
Done! thank u so much 😍