For (a-k), create an expression using the relational operators, the logical oper
ID: 3795711 • Letter: F
Question
For (a-k), create an expression using the relational operators, the logical operators, and variable names of your own choosing. You will first need to prompt the user for (age, temperature, height, current month, a random letter, tax rate, income and humidity)
is a person's age equal to 30?
is a body temperature greater than 98.6?
is a person's height less than 6 feet?
is the current month 12?
check if the letter input is m
is a person's age equal to 30 and is the person taller than 6 feet?
check if a length is greater than 2 feet and less than 3 feet
taxRate is over 25% and income is less than $20000
temperature is less than or equal to 75 or humidity is less than 70%
age is over 21 and age is less than 60
age is 21 or 22
Explanation / Answer
printf("Please enter your age, temperature, height, current month, a random letter, tax rate, income and humidity");
scanf("%d", &age, &temperature, &height, ¤tMonth, &letter, &taxRate, &income, &humidity);
a)
if(age==30)
b)
if(bodytemperature>98.6)
c)
if(height<6)
d)
if(currentMonth==12)
e)
if(letter=='m')
f)
if(age==30 && height<6)
g)
if(length>2 && length<3)
h)
if(taxRate>25 && income<20000)
i)
if(temperature<=75 || humidity<70)
j)
if(age>21 && age < 60)
k)
if(age==21 || age==22)