Write a program to enter a number and test if it is greater than 45.6.if the number entered is greater than 45.6 the program needs to out the phrase Greater than 45.6

Answers

Answer 1
Answer:

Answer:

#include<stdio.h>                        //header file

int main()                                      //main function

{

float num;                                   // variable declaration

printf("Enter a number to test:\n");   // getting variable for test

scanf("%f", &num);

if (num>45.6)                                    //Testing weather greater or smaller

printf("\n %f is greater than 45.6", num);  // Result if greater

else

printf("\n %f is not greater than 45.6", num);  // Result if smaller or equal

return 0;

}

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


Related Questions

a security system uses sensors at every door and window which will set off an alarm if any one of them is opened. there is also a keypad by an entry door to turn on or turn off the system. describe how these components can be wired in a combination circuit to provide the needed security.
How reliable are grammar checkers?
What is individual components of a torch would need to function
How would you define a cloud today?
Summarize the role of technology in efforts to explore space.

How long does Microsoft give a user to activate Windows before displaying a message indicating Windows is not genuine?

Answers

Answer:

30-day

Explanation:

Microsoft gives you a 30-Day grace period to activate windows

Why computer said to be a "brilliant invention of mankind"?

Answers

Answer:

It is known as a "brilliant invention of mankind"because it knows everything.

Which of the following actions can NEGATIVELY impact your credit score?

Answers

The answer to the question stated above is "forget to pay the cable bill"
>Payment history influences your credit score the most.

Here are the following choices to this question:
 A-dispute an item on your credit report 
B- forget to pay the cable bill 
C- pay all bills in cash 
D- use small amount of your available credit

What is cyberbullying?

Answers

Cyberbullying is basically bullying over the cybernetic world, over social media and the internet. Victims might not know who is bullying them.
Cyberbullying is bullying other people over the internet/

To consider the context of a work means to ​

Answers

Analyze and try to understand it

What is the definition of online communication

Answers

it basicly means there are multiple ways of communication