# programming

posted by .

what will be the c++ source code of finding the largest value among the N numbers? translate the algorithm:
1. the largest number is:
2. the smallest number is:
3. display all the numbers inputted:
4. show the final output.

• programming -

int a,b;
cout<<"enter the value of a:";
cin>>a;
cout<<"enter the value of b:";
cin>>b;
if(a>b)
cout<<"largest value is:"<<a<<endl;
else
cout<<"smallest value:"<<b<<endl;

## Similar Questions

1. ### Computer Programing & Logic Design

Submit pseudocode and a flowchart for the following programming exercise: Largest and Smallest Design a program with a loop that lets the user enter a series of numbers. Theuser should enter -99 to signal the end of the series. After …
2. ### Computer Programing & Logic Design

Submit pseudocode and a flowchart for the following programming exercise: Largest and Smallest Design a program with a loop that lets the user enter a series of numbers. Theuser should enter -99 to signal the end of the series. After …
3. ### Programming

Read two numbers from the keyboard Display the menu options as follows: 1 - computes the sum of two numbers. 2 - computes the difference (first minus second). 3 - computes the product of the two numbers. 4 - if the second number is …
4. ### programming

Step 1: Design a flowchart or write pseudocode for a program that allows a user to enter 12 numbers, then displays all of the numbers (in the order they were entered) as well as the largest number and the smallest number. Step 2: Implement …
5. ### jefferson ore

Using digits 1-9to build following numbers largest even number,largest number with 8 in millions place, smallest number .don't understand how to do this
6. ### Program

Write a pseudocode and algorithm that to else the user to input 10 numbers in program we display the largest number
7. ### algebra

The sum of 3 numbers is 24. Twice the smallest number is 2 less than the largest number and the largest number is equal to the sum of the other two. what are the three numbers?
8. ### college algebra

Three even numbers sum up to 104. The smallest is half the largest and the middle number is 2 3 the largest. What are the three numbers?
9. ### maths

anderly chooses three different whole numbers. The largest number is 3 times the smallest number. The middle number is 3 less than the largest number. The sum of the number is three numbers is greater than 30 and smaller than 35. Write …
10. ### maths

anderly chooses three different whole numbers. The largest number is 3 times the smallest number. The middle number is 3 less than the largest number. The sum of the number is three numbers is greater than 30 and smaller than 35. Write …

More Similar Questions