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
Sati [7]
2 years ago
13

Write a c program that asks the user to enter two numbers. the program should use the conditional operator to determine which nu

mber is the smaller and which is the larger
Computers and Technology
1 answer:
iris [78.8K]2 years ago
6 0

Using the knowledge in computational language in C++ it is possible to write a code that asks the user to enter two numbers. the program should use the conditional operator to determine which number is the smaller and which is the larger.

<h3>Writting in C++ code:</h3>

#include <iostream>

using namespace std;

int main(){

float a, b;

cout<<"Enter two numbers:";

cin>>a>>b;

if(a>b) {

cout<<"Larger Number:"<<a<<endl;;

cout<<"Smaller Number:"<<b;

}

else if(b<a){

cout<<"Larger Number:"<<b<<endl;

cout<<"Smaller Number:"<<a;

}else{

cout<<"Number are equal!"<<endl;

}

}

See more about C++ code at brainly.com/question/19705654

#SPJ1

You might be interested in
IF YOU GET THIS RIGHT U GET BRAINLIEST
Bumek [7]
False
                                                     false
 its false im fr 
5 0
4 years ago
Read 2 more answers
1.
Hatshy [7]

Answer:

Hi!

The following Javascript statement compares if num is 2 or 5 and increment num by 1 if true.

if ( num==2 || num==5)  

num = num +1;

Explanation:

The operator == is used to compare if the operands are equal.

The operator || is OR.

  • If at least one of the operands is true then return true.
  • If all operands are false returns false.

if( num==2 || num==5) <em> // if num is equal 2 or if num is equal 5</em>

num = num +1; <em>// adds 1 to num.</em>

8 0
4 years ago
which quotation from the story of the fisherman in the Arabian nights' entertainments supports the theme that cleverness trumps
Greeley [361]

Answer:

Vexed with having such a bad haul, when he had mended his nets, which the carcass of the butt had broken in several places, he threw them a second time

Explanation:

SORRY IF WRONG JUST TRYING TO GET BRAINLIEST TO LEVEL UP

6 0
4 years ago
10011÷11 binary division​
Nostrana [21]

Answer:

110.01001

Explanation:

it's a repeating decimal

6 0
3 years ago
4.5 code practice edhesive
Bezzdna [24]

Answer:

n= input("Please enter the next word: ")

x=1

while(n != "STOP"):

 print("#" + str(x) + ": You entered " + n)

  x=x+1

  n= input("Please enter the next word: ")

print("All done. " + str(x-1) + " words entered.")

Explanation:

8 0
3 years ago
Other questions:
  • Name the written test a potential driver must pass and list the minimum required score to earn a learners license?
    9·1 answer
  • On the server side, the database environment must be properly configured to respond to clients' requests in the fastest way poss
    12·1 answer
  • Design a class FileArray that has a static method named writeArray. The method should take two arguments: the name of a file and
    11·1 answer
  • Prompt the user to enter five numbers, being five people's weights. Store the numbers in an array of doubles. Output the array's
    5·1 answer
  • What is responsible for coordinating a computer's hardware and software components?
    13·1 answer
  • Which of the following statements is false? a. As of Java SE 8, any interface containing only one method is known as a functiona
    6·1 answer
  • JAVA
    13·1 answer
  • Level Access Test - Please Ignore
    14·1 answer
  • Question 3 (8 marks): Write a program that takes a string from the user and splits it into a list using a space (" ") as the del
    13·1 answer
  • A technician is troubleshooting a Windows computer and needs to stop the explorer.exe process.Multiple attempts to open Task Man
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!