answersLogoWhite

0

//The following is very simple program that will find the largest of any 3 numbers

#include <iostream>

using namespace std;

int main()

{

int n1, n2, n3, largest;

cout <<"Enter any 3 numbers ";

cin >>n1;

cin >>n2;

cin >>n3;

if(n1 > n2 && n1 > n3)

largest= n1;

else if(n2 >n1 && n2 >n3)

largest= n2;

else

largest= n3;

return 0;

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is the number of decision variables allowed in a linear program?

There is no limit to the number of variables.


State max number of points lie on graph of linear equation in two variables to represent this statement?

There is no "this statement" associated with the question, but the maximum number of points which lie of the graph of a linear equation in two variables is infinite.


How do you write a c program to convert binary to decimal by using while statement?

write a c++ program to convert binary number to decimal number by using while statement


Is a number a variable or the product of a number and one or more variables raised to whole number powers?

The statement is true only if either the number is 0, or the variables are all raised to the power 0. In no other case can a variable involved.


Write a program By using if else statement to read a number and check whether it is positive or negative?

write a c++program by using if statement to read a number and check whether it is positive or negative


How many structure variables of a given type can you use in a C program?

You can use unlimited number of variables for a structure and you can also declare array of structures.


Write a program large number and small number among n numbers by using If statement?

12


C program to fine the largest of 10 given number?

first sort the ten numbers in descending order and print the first number. That will be the largest no


Which statement is falseThe largest number of immigrants to America before 1860 came from Central and Southeastern Europe?

The largest number of immigrants to America before 1860 came from Central and Southeastern Europe.


Write a pseudocode statement that assigns the sum of 10 and 14 to the variable total?

There are different ways of writing a pseudocode statement but the concept remains, it can be presented: /*Declare variables Total (number (3)) = 0 A (number (2)) =10 B (number (2)) =14 begin Total=A+B end


What is the largest prime no that is stored in 8 bit pattern?

Write your own prime number program and find out.


What is valid statement about land distribution in many central American nations?

the largest amount of land is owned by the smallest number of families