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
Kazeer [188]
3 years ago
11

Anyone can help me with this?

Computers and Technology
1 answer:
dybincka [34]3 years ago
5 0

Answer:

/*

 Find Largest and Smallest Number in an Array Example

 This Java Example shows how to find largest and smallest number in an  

 array.

*/

public class FindLargestSmallestNumber {

 

public static void main(String[] args) {

 

//array of 10 numbers

int numbers[] = new int[]{32,43,53,54,32,65,63,98,43,23};

 

//assign first element of an array to largest and smallest

int smallest = numbers[0];

int largetst = numbers[0];

 

for(int i=1; i< numbers.length; i++)

{

if(numbers[i] > largetst)

largetst = numbers[i];

else if (numbers[i] < smallest)

smallest = numbers[i];

 

}

 

System.out.println("Largest Number is : " + largetst);

System.out.println("Smallest Number is : " + smallest);

}

}

 

/*

Output of this program would be

Largest Number is : 98

Smallest Number is : 23

*/

Explanation:

You might be interested in
This week you will learn about basic code structure. The term structure, as it relates to programming, refers to the decisions y
GenaCL600 [577]
Instead of having to write multiple pieces of code for different outcomes, you can use an elseif statement and make your code easier to read and easier to understand.
8 0
4 years ago
Assume that the data on a worksheet consume a whole printed page and two columns on a second page. You can do all of the followi
UNO [17]

Answer:

Option (2) is the correct answer of this question.

Explanation:

We will increase the left and right margins of the data on a worksheet that will consume a whole printed page  and columns on second page then the data will print all in one page.

Following are the steps to print the Data all in on page:-

Step 1.  Choose the Ribbon Page Design button

Step2.  select 1 page in the Scale to Fit category, and in the Width box, we  will automatic choose the height box.                

Step 3 .Finally we will  choose 1 page in the Height box to print your worksheet to a single page.

 "Other options are incorrect because they are not related to the given    question.i.e, to print the data in on page in the worksheet".

4 0
3 years ago
Summary In this lab, you declare and initialize variables in a C++ program. The program, which is saved in a file named NewAge.c
AVprozaik [17]

Answer:

<em>#include <iostream></em>

<em>using namespace std;</em>

<em>int main()</em>

<em>{</em>

<em>  int myNewAge;</em>

<em>  int myCurrentAge = 29;</em>

<em>  int currentYear = 2020;</em>

<em> </em>

<em>myNewAge = myCurrentAge+(2050-currentYear);</em>

<em />

<em>cout<<"My Current Age is "<<myCurrentAge<<". I will be "<<myNewAge<<" in 2050"<<endl;</em>

<em>    return 0;</em>

<em>}</em>

Explanation:

The program is written in C++ language as required. firstly, we declare the three variables:

<em>  </em><em>int myNewAge;</em>

<em>  int myCurrentAge = 29;</em>

<em>  int currentYear = 2020;</em>

Then we calculate the new age as: <em>myNewAge = myCurrentAge+(2050-currentYear);</em>

Using multiple cout operators (<em> </em><<) we display the output nicely as required by the question with this statement

<em>cout<<"My Current Age is "<<myCurrentAge<<". I will be "<<myNewAge<<" in 2050"<<endl;</em>

7 0
3 years ago
WILL GIVE MORE POINTS, PLEASE HELP!!!
Karo-lina-s [1.5K]
Right 4 down 5 right 8 !!!!!!!!!
5 0
3 years ago
You work in an office that uses Linux servers and Windows servers. The network uses both the TCP/IP protocol. The Linux server i
kap26 [50]

Answer:

The answer is "ifconfig".

Explanation:

The ifconfig. me is indeed a website that shows basic network packets, like IP address, hostname, user agent string. It provides a simple interface that may be queried with the assistance of the command prompt to obtain the required information. The whole function provides the essential information about a certain program's interface.

5 0
3 years ago
Other questions:
  • A company has a network printer that is utilzed by several departments. Although the printer shows online and other departments
    11·1 answer
  • Gn to be printed at a commercial printer. Which main ink type's exact color appearance is determined by the printer and requires
    13·1 answer
  • Document creation is a key business function because:
    6·2 answers
  • Sending an e-mail message to customers or potential customers of a legitimate website asking them to click a link that leads to
    10·1 answer
  • (tco 3) what vbscript boolean operator could be used to replace the nested selection structure in this pseudocode? if empmedical
    13·1 answer
  • What kind of storage is an internet service that provides storage to computer users?
    12·1 answer
  • Computer is created by aliens?!
    14·1 answer
  • When you reference a cell or range in a different worksheet, the ____ separates the sheet reference from the cell reference.
    10·1 answer
  • Nhiệt độ chiết rót của máy chiết rót có van trượt là bao nhiêu
    6·1 answer
  • 80billion +2 TRILLION . PLEASE AWNSER
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!