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
Inessa [10]
2 years ago
10

Write a function magicCheck that takes a one-dimensional array of size 16, a two-dimensional array of four rows and four columns

, and the sizes of the arrays as parameters. By adding all the elements of the one-dimensional array and dividing by 4, this function determines the magicNumber. The function then adds each row, each column, and each diagonal of the two-dimensional array and compares each sum with the magic number. If the sum of each row, each column, and each diagonal is equal to the magicNumber, the function outputs ‘‘It is a magic square’’. Otherwise, it outputs ‘‘It is not a magic number’’. Do not print the sum of each row, each column, and the diagonals.
End
Computers and Technology
1 answer:
mixer [17]2 years ago
4 0

Answer:

it is twon

Explanation:

because i did it haha

You might be interested in
Which of the following describes the phishing method of information security crime?
Marianna [84]
<span>C. pretending to be someone else when asking for information</span>
3 0
3 years ago
Read 2 more answers
What is the new subnet mask in prefix format?
vodomira [7]

In the case above, the the new subnet mask in prefix format is seen in IPv6 and in IPv4.

<h3>What is subnet prefix mask?</h3>

A lot or a single computer that is known to be linked to a subnet is said to shares a kind of an identical part of the IP address.

Note that this shared information is said to be called the  routing prefix, and in IPV4 (Internet Protocol Version 4), the routing prefix is said to be called a subnet mask.

Hence, The the new subnet mask in prefix format is seen in IPv6 and in IPv4 because that is the format that it always comes in.

Learn more about subnet from

brainly.com/question/8907973

#SPJ1

3 0
2 years ago
Notice that the iris.target array contains 3 different labels. Create a plot that you think is interesting using the data from t
Alexeev081 [22]

Answer:

from sklearn.datasets import load_iris

import seaborn as sns

import pandas as pd

data = load_iris()

final_data = data.data[:]

final_data = pd.DataFrame(final_data)

final_data.columns = ['SepalLengthCm', 'SepalWidthCm', 'PetalLengthCm', 'PetalWidthCm']

species = data.target[:]

final_data['Species'] = species

sns.pairplot(final_data, hue='Species')

Explanation:

8 0
3 years ago
Write a program that reads in ten numbers and displays the number of distinct numbers and the distinct numbers separated by exac
ELEN [110]

Answer:

The program to this question can be given as:

Program:

//import package.

import java.util.*;

public class Main //defining the class

{

public static void main(String[] args) //defining main method  

{

 Scanner ob = new Scanner(System.in); //creating scanner class object.

 int[] a = new int[10];//define array.  

 int number,counts= 0,i;//define variable.

 System.out.print("Enter numbers: "); //message.

 for (i = 0; i < 10; i++) //loop  

 {

  number=ob.nextInt();

  if (isDistinct(a,number))

  {

      a[counts] = number;//assign value in array

      counts++; // Increment count

  }

 }

 System.out.println("The distinct numbers is :" + counts);

 System.out.print("The distinct number are :");

 for (i = 0; i <a.length; i++)//loop

 {

  if (a[i] > 0)

  {

   System.out.print(" " +a[i]);//print array.    

  }

   

 }

 System.out.println();

}

public static boolean isDistinct(int[] array, int num)//defining method  

{

 for (int i = 0; i < array.length; i++)//loop for check number  

 {

  if (num == array[i]) //check condition

  {

      return false; //return value false.

  }

 }

 return true; //return value true

}

}

Output:

First time run:  

Enter ten numbers: 1 2 3 4 5 6 7 8 9 10

The number of distinct numbers is 10

The distinct numbers are 1 2 3 4 5 6 7 8 9 10

Second time run:

Enter numbers: 2 3 5 8 7 4 3 2 1 2

The distinct numbers is :7

The distinct number are : 2 3 5 8 7 4 1

Explanation:

The description of the above java code can be given as:

  • In the above java code, a class is defined that is main inside a class-main function is defined in the main function firstly creating a scanner class object that is "ob" then define variables and array that are number, counts and a[].
  • To inserts array elements we use a loop. In the loop, we use integer variable number and define a condition in if block passes a function that check value count total value.
  • In the second loop, we check the condition that array elements value is greater than 0 and print all array elements.
  • The isDistinct function checks in the array two values are not the same. if the values are the same it will return false value because this function is the boolean type that returns an only boolean value.
6 0
3 years ago
A business letter is not written:
Andreas93 [3]

Answer: the answer is b

Explanation:Bc why would they make a business letter 2 someone else

5 0
3 years ago
Other questions:
  • The area surrounding your car that can't be seen from the driver's seat is called
    14·2 answers
  • Pressing the _____ key when entering title text in a placeholder creates a new paragraph. BACKSPACE SHIFT DELETE ENTER
    5·1 answer
  • Rob used Track Changes to suggest changes in Jack's document. Jack agrees with some edits and disagrees with others. What should
    14·1 answer
  • False
    8·1 answer
  • (k + 3)by the power of 3​
    9·1 answer
  • How does Map Put function work in Java? *
    12·1 answer
  • Who is maintain data and time of computer?​
    5·1 answer
  • Kate saves her work on a secondary storage device that is fairly new, and uses flash technology instead of disks.
    10·1 answer
  • To call the superclass's no-parameter constructor explicitly, use super(); group of answer choices true false
    10·1 answer
  • Which remote access role service allows publishingweb-based applications for use by clients outside thenetwork?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!