answersLogoWhite

0


Best Answer

#include<iostream.h>

#include<conio.h>

void main()

{

int a,b,c;

cout<<"enter the value of a"<<endl;

cin>>a;

cout<<"enter the value of b"<<endl;

cin>>b;

cout<<"enter the value of c"<<endl;

cin>>c;

if(a>b)

{

if(b>c)

{

cout<<"the middle number is b:"<<endl;

}

else

{

if(a>c)

{

cout<<"the middle is c:"<<endl;

}

else

{

cout<<"the middle number is b:"<<endl;

}

}

if(a<b)

{

if(b<c)

{

cout<<"the middle number is b:"<<endl;

}

else

{

if(a<c)

{

cout<<"the middle number is c:"<<endl;

}

else

{

cout<<"the middle number is a:"<<endl;

}

}

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write algorithm to find middle number in three numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write an algorithm to check whether a number is a prime number or not?

You can write out this algorithm. This will then be programmed into the device to make determining prime numbers easier.


How to write an algorithm that accepts five numbers and displays the sum and average of the numbers?

1.Start Algorithm 2.Enter first number 3.Enter second number 4.Enter third number 5.Enter fourth number 6.Enter fifth number 7.Add five number 8.display five number / 2 9.Display result 10.End Algorithm


Can you write an algorithm to find the beast numbers?

maybe


Write an algorithm and draw a corresponding flowchart to search a number in the given list of numbers and also display its position?

please give me an algorithm and a corresponding flow chart that displays list of numbers from 1 to 20.


Write algorithm compute sum of square of N numbers?

1. Design an algorithm to compute sum of the squares of n numbers?


What the median in math?

Write the numbers of a set in ascending order. If there is an odd number of numbers, the median is the one in the middle. If there is an even number of numbers, the median is the average of the middle two.


Write algorithm and draw flowchart to find the sum of even numbers?

jgfujtf


How can you write an algorithm for getting autoformic numbers?

Perhaps you mean an automorphic number? Loop through a series of numbers - for example, all numbers from 1 to 10,000 - and check each of the numbers, whether the condition applies. The condition in this case is that if you square the number, the last digits represent the original number.


Write an algorithm to print sum of all even numbers?

Start print "the sum of all even numbers is infinite" end


How can I write a program to display prime numbers from 1 to 100?

Write a function that implements an algorithm that checks to see if a particular integer is prime (returning a boolean). Write a program that uses that function on each number from 1 to 100, and if true, displays that number.


Write a algorithm and flowchart to find largest among N numbers?

Max = 0For K = 1 to NIf Number(K) > Max then Max = Number(K)Next KPrint Max


3 Write the algorithm of inserting an element at middle of a linked?

theory part to how u can insert element at middle of link list ?