hmm, i'm not sure atm but i'll come back to you when i have the answer.
Answer:
Explanation:
The Hexa-decimal numbers have base 16 and includes numbers:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F
The given steps are performed to convert a decimal number to hexa-decimal number, here to convert decimal number 35 to hexa-decimal number:
- Divide 35 by 16
- Note the remainder, r which is 3 here and quotient which is 2
- Again divide 2 (quotient) by 16 and note the remainder, r' which is 2 and quotient is 0
- We will stop here as the quotient is now 0. Usually division by 16 is repeated until we get quotient = 0
- Now arrange the remainder in reverse order to get the hexa-decimal number as r'r
- The hexa-decimal number is
Answer:
The C code is explained below. The highlighted code represents the "your solution goes here" section
Explanation:
//Header file section
#include <stdio.h>
//Program begins with a main method
int main(void)
{
//Declare the integer variables
int userNum1;
int userNum2;
//Initialized the values to the variables
userNum1 = 1;
userNum2 = 14;
// If userNum1 is less than 0, then print "userNum1 is negative".
// '\n' represents end with newline
if (userNum1<0)
{
printf("userNum1 is negative. \n");
}
//If userNum2 is greater than 10, then convert userNum2 to 0.
//Otherwise, print "userNum2 is less than or equal to 10"
if (userNum2>10)
{
userNum2 = 0;
}
else
{
printf("userNum2 is less than or equal to 10.");
//'\n' represents end with newline
printf("\n");
}
//Print userNum2 value
printf("userNum2 is %d. \n", userNum2);
return 0;
}
False.................... Lol