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
Maru [420]
4 years ago
13

JAVASCRIPT or BLUEJ:

Computers and Technology
1 answer:
Anna71 [15]4 years ago
6 0

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

   Scanner entries = new Scanner(System.in);

   System.out.print("Enter 3 Numbers: ");

   int n1 = entries.nextInt();

   int n2 = entries.nextInt();

   int n3 = entries.nextInt();

   printSortedNumbers(n1, n2, n3);

}

public static void printSortedNumbers(double n1, double n2, double n3){

if ((n1 < n2) && (n2 < n3)){

   System.out.println("Sorted list is"+ n1 + " " + n2 + "" + n3);

   }

if ((n1 < n2) && (n2 > n3)){

   System.out.println("Sorted list is " + n1 + " " + n3 + " " + n2);

   }

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

   System.out.println("Sorted list is" + n3 + " " + n2 + " " + n1);

   }

if ((n1 > n2) && (n2 < n3)){

   System.out.println("Sorted list is" + n2 + " " + n1 + " " + n3);

   }

}

}

Explanation:

The program uses a function, in which three numbers are compared and then sorted list is printed out. For inputing three numbers Scanner has been used.

You might be interested in
Finish and test the following two functions append and merge in the skeleton file:
avanturin [10]

Answer:

Explanation:

#include <iostream>

using namespace std;

int* append(int*,int,int*,int);

int* merge(int*,int,int*,int);

void print(int*,int);

int main()

{ int a[] = {11,33,55,77,99};

int b[] = {22,44,66,88};

print(a,5);

print(b,4);

int* c = append(a,5,b,4); // c points to the appended array=

print(c,9);

int* d = merge(a,5,b,4);

print(d,9);

}

void print(int* a, int n)

{ cout << "{" << a[0];

for (int i=1; i<n; i++)

cout << "," << a[i];

cout << "}\n";

}

int* append(int* a, int m, int* b, int n)

{

int * p= (int *)malloc(sizeof(int)*(m+n));

int i,index=0;

for(i=0;i<m;i++)

p[index++]=a[i];

for(i=0;i<n;i++)

p[index++]=b[i];

return p;

}

int* merge(int* a, int m, int* b, int n)

{

int i, j, k;

j = k = 0;

int *mergeRes = (int *)malloc(sizeof(int)*(m+n));

for (i = 0; i < m + n;) {

if (j < m && k < n) {

if (a[j] < b[k]) {

mergeRes[i] = a[j];

j++;

}

else {

mergeRes[i] = b[k];

k++;

}

i++;

}

// copying remaining elements from the b

else if (j == m) {

for (; i < m + n;) {

mergeRes[i] = b[k];

k++;

i++;

}

}

// copying remaining elements from the a

else {

for (; i < m + n;) {

mergeRes[i] = a[j];

j++;

i++;

}

}

}

return mergeRes;

}

4 0
4 years ago
The purpose of this assignment is to determine a set of test cases knowing only the function’s specifications, reported hereaf
Nesterboy [21]

Answer:

The program is written using PYTHON SCRIPT below;

N=int(input(" Enter number of Rows you want:"))

M=[] # this for storing the matrix

for i in range(N):

l=list(map(int,input("Enter the "+str(i+1)+" Row :").split()))

M.append(l)

print("The 2D Matrix is:\n")

for i in range(N):

print(end="\t")

print(M[i])

W=[] # to store the first non zero elemnt index

T=[] # to store that value is positive or negative

L=len(M[0])

for i in range(N):

for j in range(L):

if (M[i][j]==0):

continue

else:

W.append(j) # If the value is non zero append that postion to position list(W)

if(M[i][j]>0): #For checking it is positive or negative

T.append(+1)

else:

T.append(-1)

break

print()

print("The first Non Zero element List [W] : ",end="")

print(W)

print("Positive or Negative List [T] : ",end="")

print(T)

Explanation:

In order for the program to determine a set of test cases it takes in input of 2D matrix in an N numbet of rows.

It goes ahead to program and find the column index of the first non-zero value for each row in the matrix A, and also determines if that non-zero value is positive or negative. The If - Else conditions are met accordingly in running the program.

5 0
3 years ago
Help me find the right answer please.
timama [110]

Answer:

I'm not sure

Explanation:

I'm good at math but I do not see any numbers to work with. SORRY

5 0
3 years ago
What process identifies and grants access to a user who is trying to access a system? A. Credibility
xeze [42]

Answer:

Option C is the correct answer for the above question

Explanation:

Authentication is used to grant a person to use the system so that no other person can hack the data of the system. It is done by some unique id which is provided to the user of that system. When any person wants to use the system he needs to use that a unique id and sometimes password and some other information to use the system.

The above question asked about the process through which the user of the system grants access to use the system only. So the process is Authentication. hence Option C is correct because it states about the process Authentication while the other is not because--

  • Option a states Credibility which is not the process to enter the system.
  • Option b states Authorization which is used if the system gives access to the user, not the user can take on its own.
  • Option d states Honesty which is not the process to enter the system.
8 0
3 years ago
(word excel)
Aloiza [94]
D is the answer to that problem
7 0
3 years ago
Other questions:
  • What country threatens Denmark at the beginning of Hamlet as evidenced in Marcellus’s question, "Why this same strict and most o
    13·1 answer
  • What are the advantages of upgrading computer hardware?
    13·2 answers
  • which type of classroom enable students to attend lectures without being physically present with the teacher
    14·2 answers
  • If given the chance to own manage a business,what will be the name of the business?
    11·2 answers
  • Give me 3 facts and 3 opinions
    5·1 answer
  • How can you solve real world mathematical problems using two linear equations in two variables​
    11·1 answer
  • To delete only the selected contents of the table, but not the table itself, ____.
    7·1 answer
  • Anyone down to play gta later i play on ps4?
    15·2 answers
  • Jabria are you smart
    14·2 answers
  • What is the purpose of a Post Mortem Review? (5 points)
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!