Ask Question
23 December, 01:02

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. 23 December, 01:15
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers