Ask Question
30 January, 21:45

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

+3
Answers (1)
  1. 31 January, 00:12
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers