1 Answers

a couple solutions come to mind, here are some:

  1. a bunch of if loops with long conditions

  2. write a function that has a variable symptomsCount, and if conditions for each of the 4 symptoms. If symptoms are true, then increment symptomsCount. Then, if symptomsCount is >= 2, return 1

  3. write a function with a symptomsArray and initialize values to 0. If a certain symptom is met, change the corresponding symptomsArray value from 0 to 1. Then, sum the symptomsArray, and if the sum is >= 2, return 1

Related