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
djverab [1.8K]
3 years ago
6

Write a program to assign distinct number between 1 and 200 into an int array of 100 elements in ascending order (you may reuse

the code from practice

Computers and Technology
1 answer:
Alexus [3.1K]3 years ago
7 0

Answer:

import java.util.Arrays;

public class num2 {

   public static void main(String[] args) {

       int []intArray = new int[100];

       for(int i=0; i<intArray.length; i++){

       intArray[i] = i+1;

       }

       System.out.println(Arrays.toString(intArray));

   }

}

Explanation:

Firstly create an array of size 100 with this statement

int []intArray = new int[100];

Using a for loop add elements into the array starting at i=0+1 (to acheive an asceending order) since i will run from 0-99.

see the attached code and output

You might be interested in
___________ is an unsecured client server application / protocol that transfers files between two computers.
Alexus [3.1K]
It is known as the File Transfer Protocol or FTP. It is based on a customer server demonstrate design and uses isolate control and information associations between the customer and the server. FTP clients may conform themselves with an unmistakable content sign-in convention, regularly as a username and secret word, yet can interface namelessly if the server is designed to permit it.
6 0
4 years ago
In which format is information stored on a hard drive?
Natalija [7]
The answer is binary
6 0
3 years ago
"assignment is to create a program that will read a value from an array, and then place this value in another array with the loc
White raven [17]

Answer:

#include <iostream>//including libraries

using namespace std;

int main()

{

int arr[6] = { 0,1,2,3,4,5 };//make sure size of arr is 1 less than secArr

int secArr[7];//second array (1 element bigger)

for (int i = 0;i < 6;i++)//looping through each element (6 times)

{

 secArr[i + 1] = arr[i];//transferring elements to second array and shifting by 1 cell

 cout << secArr[i + 1] << endl;//printing elements of second array

}

return 0;//terminating program

}

Explanation:

The array size can range from any number. just make sure to keep arr one less than secArr. This is because we need the room for the extra element. This task is to help you understand how array work and how to parse through them using loops. For loops are the best for this task because even if you think intuitively, they work for as long as there are items in the array. and you can define the size yourself.

5 0
3 years ago
Client computers cannot function unless they are connected to the network because they cannot access an operating system.
Shtirlitz [24]

Answer: true

Explanation:

As the operating system cannot run from an external device and in a distributed operating system all the clients needs to be connected to the network to share resources via the distributed or network operating system.

8 0
3 years ago
Server virtualization in windows server 2012 r2 is based on a module called the
alexgriva [62]
<span>Server virtualization in windows server 2012 r2 is based on a module called the</span> hypervisor.
3 0
3 years ago
Other questions:
  • Perhaps programs used for business purposes ought to conform to higher standards of quality than games. With respect to software
    7·1 answer
  • Suppose you are currently in the /home/hnewman/os/fall/2013 directory and would like to navigate to /home/hnewman/discreteStruct
    9·1 answer
  • Fill in the blank. Do not abbreviate.
    6·1 answer
  • Can you plug a usb 2.0 into a 3.0 port on your computer
    12·1 answer
  • Name one app that currently has a positive impact on society and explain why you think it has had a positive effect.
    10·1 answer
  • Which industry has the highest employment figure for both teen and young adults in July, 2014?
    6·1 answer
  • This type of software works with end users, application software, and computer hardware to handle the majority of technical deta
    12·1 answer
  • What do you mean by GIGO (Garbage-In-Garbage-Out) in computer system?​
    6·1 answer
  • What is the base of a number system?
    8·1 answer
  • Which of these technologies has been most used by terrorist organizations?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!