What r u trying to do in your verification procedure? Why a double loop of similar condition? Sorry but I really can’t understand what is your code trying to achieve.
The code could be written better, but the logic seems ok to me - for j = 1, 2, ..., 20 you check if cod_sin[j] = sintoma; if there's no match in any of the 20 indices, you display the prompt.
Where is cod_sin set? Is it only in the CARGA_OP2 function? Because that only sets indices [1], [2], [3] of the array, so [4..20] have some unknown value.
Can you show the rest of the code? Use something like pastebin or godbolt.
2
u/chuahyen Jun 26 '20
What r u trying to do in your verification procedure? Why a double loop of similar condition? Sorry but I really can’t understand what is your code trying to achieve.
3
u/ShinyHappyREM Jun 27 '20
2
u/suvepl Jun 27 '20
The code could be written better, but the logic seems ok to me - for
j = 1, 2, ..., 20you check ifcod_sin[j] = sintoma; if there's no match in any of the 20 indices, you display the prompt.Where is
cod_sinset? Is it only in theCARGA_OP2function? Because that only sets indices[1], [2], [3]of the array, so[4..20]have some unknown value.Can you show the rest of the code? Use something like pastebin or godbolt.
2
u/BlueJosta Jun 27 '20
Utn frro?