Ask Question
14 March, 21:06

Convert usernum2 to 0 if usernum2 is greater than 12. Otherwise, print "usernum2 is less than or equal to 12.". End with newline.

+2
Answers (1)
  1. 14 March, 21:17
    0
    The program to the given question can be given as:

    Program:

    #include

    //header file.

    int main () / /main method.

    {

    int usernum2 = 0;

    //define variable.

    if (usernum2>12) / /check condition

    {

    printf ("usernum2 is less than or equal to 12./n");

    //print value.

    }

    return 0;

    }

    Explanation:

    In the above C language program first we define an integer variable that is usernum2. In this variable we assign a value that is 0. Then we define the conditional statement in this statement in if block we check usernum2 variable value is greater then 12. if its true it will print "usernum2 is less than or equal to 12".
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Convert usernum2 to 0 if usernum2 is greater than 12. Otherwise, print "usernum2 is less than or equal to 12.". End with newline. ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers