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
Ivahew [28]
3 years ago
9

Write an algorithm that receives 500 numbers from the user and prints out the maximum of the numbers.

Computers and Technology
1 answer:
dusya [7]3 years ago
3 0

Answer:

Algorithm:

1.Create a variable "maxx" and initialize it with INT_MIN.

2.Create an array of size 500.

3.for i=0 to 499.

 3.1 Read value from user and store in array.

 3.2 if input >maxx.

 3.3 maxx=input.

4.maxx will have the largest of all 500 numbers.

5.end program.

Implementation In C++:

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variable

int maxx=INT_MIN;

// array of size 500

int arr[500];

cout<<"Enter 500 numbers:";

for(int i=0;i<500;i++)

{// read input number

    cin>>arr[i];

// find maximum

    if(arr[i]>maxx)

    maxx=arr[i];

}

// print maximum

cout<<"Maximum of all:"<<maxx<<endl;

return 0;

}

You might be interested in
Windows workstations all have elements of server software built-in. What are these elements, and why is the Windows Professional
lions [1.4K]

Answer:

The answer is below

Explanation:

Elements of Server software that is built-in, in Windows workstations are:

1. Hard drives,

2. RAM (Random Access Memory)

3. Processors

4. Network adapters.

Windows Professional OS is not considered a server due to the following:

1. Windows Professional OS has a limit on the number of client connections it allowed.

2. Unlike Server, Professional OS uses less memory

2. In comparison to Server, Professional OS uses the CPU less efficiently

4. Professional OS is not built to process background tasks, unlike Server that is configured to perform background tasks.

6 0
3 years ago
When using a software budget, you should feel very confident if you choose a solution that looks like it will come in exactly on
ludmilkaskok [199]

Answer:

probably false

Explanation:

because u dont want a budget to b exact u want it completely covered

3 0
3 years ago
the two main ways in which marketers address the competition with their strategies are by satisfying a need better than a compet
Nonamiya [84]

Offering a lower price (Apex)

4 0
3 years ago
Read 2 more answers
The template code provided is intended to take two inputs, x and y, from the user and print "pass" if one or more of the followi
just olya [345]

import java.util.Scanner;

public class U3_L6_Activity_Two{

   public static void main(String[] args){

       Scanner scan = new Scanner(System.in);

       int x = scan.nextInt();

       int y = scan.nextInt();

       if(x>=4|| ((y < 5) && ((x+y) < 7))){

           System.out.println("pass");

       }

   }

}

I'm pretty sure this is what you're looking for. Best of luck.

7 0
3 years ago
Can someone write what happened on thanksgiving but with a twist please..
swat32

Answer:

We went to (your family name) house and were having an amazing dinner when all of a sudden... crrrraaaaaackkkkkk! My (sibling gender) dropped the plates s/he was carrying. They were china too! It ruined the party and caused he/r to break put in tears. We tried to comfort them but they ran off and hid in a corner .............(your turn)

Explanation:

English major;)

7 0
1 year ago
Other questions:
  • If you want to find out the specific questions you answered incorrectly on a particular examination, what option on the Web site
    6·1 answer
  • Which of the following was one of the first internet search engines? A. archie B. google C. Yahoo D.ask
    7·1 answer
  • Which keyboard feature is a form feed character?
    15·1 answer
  • True or False. A modern programming EXE provides a text editor, a file manager, a compiler, a linker and loader, and tools for d
    9·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    11·2 answers
  • What will be the results from running the following code?
    5·1 answer
  • Please help!! I dont need the answer i just need explaining on how to do this!!!!
    9·1 answer
  • I have this questions i need to make it in a report format pages of atleast 3 pages and maximum of 5 pages​
    7·1 answer
  • How long will it take to transfer a file size of 1gb on a usb 2.0 and a usb 3.0 drive?
    6·1 answer
  • Question 11 of 20
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!