[Tex/LaTex] How to select conditional text

conditionalsxetexxifthen

I've three variable statements :

  • Statement1 = You are Great Student.
  • Statement2 = You are average Student.
  • Statement3 = You Need improvement on list of topics mentioned below.

In the report card for student, I want to show one of this statement based on marks scored by the student [I'm reading marks from external csv file as \markscore]

  • If value of \markscore is greater than or equal to 90 i want to print
    Statement1
  • If value of \markscore is greater than or equal to 80 but less than
    90 i want to print Statement2
  • Else I want to print Statement3 in the report card.

Can you please suggest latex package to print statements conditionally?

Best Answer

You don't need a package:

\ifnum\markscore>89
statement 1
\else
\ifnum\markscore>79
statement 2
\else
statement 3
\fi
\fi
Related Question