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
Aneli [31]
3 years ago
8

Write a method that takes two arguments: two integers. The integers are then squared, added and the result printed on the screen

. Write a simple program to invoke this method. ( Java )
Computers and Technology
1 answer:
diamong [38]3 years ago
6 0

Answer:

import java.util.Scanner;

class Main

{

   

     public static void main(String[] args)  

     {

     System.out.println(" Enter the the two numbers:");

     Scanner input = new Scanner(System.in);

     int a = input.nextInt();

     int b = input.nextInt();

     int c = sumsquareFunction(a, b);

     System.out.println("Sum of Square of two numbers are:" + c);

     }

public static int sumsquareFunction(int n1, int n2) {

     int c= n1*n1 + n2*n2;

     return c;  

  }

}

Explanation:

Please check the answer.

You might be interested in
William wants to create a document using a DTP<br> what time saving techniques can he use?
mote1985 [20]

Answer:

A Master Page & a Style Sheet

Explanation:

6 0
3 years ago
Which type of cable is described as a central conductor wire that is surrounded by insulating materials and placed inside a brai
Elan Coil [88]
<span>Which type of cable is described as a central conductor wire that is surrounded by insulating materials and placed inside a braided metal shield? A coaxial cable.</span>
3 0
3 years ago
When using the wait and signal operations, ____ sets the process's process control block to the blocked state and links it to th
lbvjy [14]
<span>When using the wait and signal operations, Wait sets the process's process control block to the blocked state and links it to the queue of processes waiting to enter this particular critical region.</span>
3 0
3 years ago
What is the internet​
ZanzabumX [31]
<h2>♨ANSWER♥</h2>

The Internet, sometimes called simply "the Net," is a worldwide system of computer networks -- a network of networks in which users at any one computer can, if they have permission, get information from any other computer

<u>☆</u><u>.</u><u>.</u><u>.</u><u>hope this helps</u><u>.</u><u>.</u><u>.</u><u>☆</u>

_♡_<em>mashi</em>_♡_

5 0
1 year ago
Read 2 more answers
Your baby brother has found the hammer and is eagerly eyeing one of the boxes. Describe and analyze an algorithm to determine if
erastovalidia [21]

Answer:

Question is incomplete.

Assuming the below info to complete the question

You have a collection of n lockboxes and m gold keys. Each key unlocks at most one box. Without a matching key, the only way to open a box is to smash it with a hammer. Your baby brother has locked all your keys inside the boxes! Luckily, you know which keys (if any) are inside each box.

Detailed answer is written in explanation field.

Explanation:

We have to find the reachability using the directed graph G = (V, E)

In this V are boxes are considered to be non empty and it may contain key.

Edges E will have keys .

G will have directed edge b1b2 if in-case box b1 will have key to box b2 and box b1 contains one key in it.

Suppose if a key opens empty box or doesn’t contain useful key means can’t open anything , then it doesn’t belongs to any edge.

Now, If baby brother has chosen box B, then we have to estimate for other boxes reachability from B in Graph G.

If and only if all other boxes have directed path from box B then just by smashing box B we can get the key to box b1 till last box and we can unlock those.

After first search from B we can start marking all other vertex of graph G.

So algorithm will be O ( V +E ) = O (n+m) time.

7 0
3 years ago
Other questions:
  • Descending selection sort with output during execution
    6·1 answer
  • Part 3a. Largest power of two less than (10 pts) Implement the method public static int largestPow2LessThan(int n) which calcula
    5·1 answer
  • Barr the Bear has started a business to sell fish to Poe and his fellow penguins. The penguin customers submit many fish orders,
    12·1 answer
  • The local emergency manager has the responsibility for coordinating emergency management programs and activities. A local emerge
    7·1 answer
  • Assume that sentence is a variable that has been associated with a string consisting of words separated by single space characte
    5·1 answer
  • CLICK ME IF U DARE hehehe
    10·2 answers
  • Recently, Walmart offered a wireless data contract based on bandwidth used, with a minimum monthly charge of $42 for up to 5 gig
    15·1 answer
  • which statement is true? O A Future games will be more context oriented. OB. Future games will be more product driven. Future ga
    13·2 answers
  • Pride Group of Companies is making tremendous profits in different categories of electronic goods. The group of managers have to
    12·1 answer
  • photoshop Curves, photoshop an image and manipulate the curves on a selection of the photo. upload the original photo and The ph
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!