Answer:
#include<stdio.h> //header file
int main() //main function
{
float num; // variable declaration
printf("Enter a number to test:\\"); // getting variable for test
scanf("%f", &num);
if (num>45.6) //Testing weather greater or smaller
printf("\\ %f is greater than 45.6", num); // Result if greater
else
printf("\\ %f is not greater than 45.6", num); // Result if smaller or equal
return 0;
}
Step-by-step explanation:
- First of all , a variable will be declared in float (data type ).
- User will input data in variable.
- The variable will be compared using logical operator with 45.6
- If it is greater, A phrase will be passed that number is greater than 45.6
- Else if the number will not greater the phrase will say that the number is not greater than 45.6