1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sveta_85 [38]
2 years ago
13

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 nee

ds to out the phrase Greater than 45.6
Computers and Technology
1 answer:
Elina [12.6K]2 years ago
4 0

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

You might be interested in
Answer the following questions:
victus00 [196]

Answer:

The answer to the following questions can be given as:

Question: 1

value of foo is = 1020

Question: 2

Output of the code is = false

Question: 3

function add(a, b)

{

 return a && b ? a + b : function (c) { return a + c; };

}

var a=add(2,5);

var x=add(2)(5);

print(a);

print(x);

output:  

7

7

Question: 4

"goh angasal a m'i"

Question: 5

In this we check that if in the window a foo function exists. otherwise we set windows.foo to bar.

Question: 6

first alert shows the value "Hello World";

second alert shows value ReferenceError, In this bar not defined.

Question: 7

The value of foo.length is  2

Question: 8

The value of foo.x is undefined

Question: 9

Function print = "one", "three", "two" .

Question :10

It is difficult to define because doSomethingElse() function is not defined.

Explanation:

In question 1 the value of the foo variable is 1020 because we perform the string concat operation.

In question 2 Output of the code is false because float value keeps in binary and when we convert 0.1 or 0.2 to binary so it is not the same.

In question 3 the output of both functions is 7.

In question 4 the output is goh angasal a m'i because In this code we use the reverse() function, split() function and join() function. Reverse function reverses the value. split function splits the value and join function join all the value of the string in a line.

In question 5 we check the value.

In question 6, the first output is Hello World and second is ReferenceError.

In question 7, the value of foo.length is 2 because this foo array we insert only 2 values.

In question 8, the value of foo.x is undefined because in the variable we reset the value of foo all together, so foo.x value is undefined.

In the question 9 function print "one",  

"three",  

"two" because In the function first, we print the message that is "one" then we define a function in this function we print the value  

"two" but before creating object we call the "three" so the print value is "one",  

"three",  

"two".

In question 10 function, the output of this function is undefined.

3 0
3 years ago
Fuction table of JK-Flip flop?
vivado [14]

Answer:

Explanation:

The Truth Table for the JK Function. Then the JK flip-flop is basically an SR flip flop with feedback which enables only one of its two input terminals, either SET or RESET to be active at any one time thereby eliminating the invalid condition seen previously in the SR flip flop circuit.

6 0
2 years ago
I need help with these
solmaris [256]

Answer:

Choose internet is the right answer

7 0
2 years ago
def transfer(bank, log_in, userA, userB, amount): ''' In this function, you will try to make a transfer between two user account
laiz [17]

Answer:

def transfer(bank, log_in, userA, userB, amount): ''' In this function, you will try to make a transfer between two user accounts. bank is a dictionary where the key is the username and the value is the user's account balance. log_in is a dictionary where the key is the username and the value is the user's log-in status. amount is the amount to be transferred between user accounts (userA and userB). amount is always positive. What you will do: - Deduct the given amount from userA and add it to userB, which makes a transfer. - You should consider some following cases: - userA must be in the bank and his/her log-in status in log_in must be True. - userB must be in log_in, regardless of log-in status. userB can be absent in the bank. - No user can have a negative amount in their account. He/she must have a positive or zero balance. Return True if a transfer is made. For example:

Explanation:

i know this much

8 0
2 years ago
Many works by Mark Twain were published before 1923. In addition, there are other works that were discovered after his death and
Sauron [17]
I think is the last one
4 0
3 years ago
Other questions:
  • Your brother is a video producer and is looking to buy some sort of new computing device. he needs a lot of memory and processin
    11·1 answer
  • Which function can you use to abbreviate the lengthy expression, A1+A2+A3+A3...+A19+A20?  MAX COUNT SUM ROUND
    10·2 answers
  • Help please?
    10·1 answer
  • In which of the following situations should you expect to provide your Social Security number?
    13·1 answer
  • An interrupt priority scheme can be used to ____. allow the most urgent work to be finished first make it possible for high-prio
    14·1 answer
  • Visual culture is an area of academic study that deals with the totality of images and visual objects produced in ____________,
    6·1 answer
  • Being nice take the points​
    9·1 answer
  • Not every organization integrates with the Internet, but all use some or most of the technology that gave rise to it.
    15·1 answer
  • Select the correct technical term for each definition by using the drop-down menus.
    13·1 answer
  • Which cloud technology characteristic ensures that a cloud customer can make changes to her cloud database from her smartphone w
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!