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]
4 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]4 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
If you wanted readers to know a document was confidential, you could include a ____ behind the text stating
Maksim231197 [3]
I have no idea for that
4 0
3 years ago
Read 2 more answers
An increase in Consumption will ___________ in the Classical Model of Aggregate Demand.
Step2247 [10]
The answer to your question is b
8 0
3 years ago
Which is an example of an input device?
disa [49]

Answer:

Explanation:

Mouse is an example of input device

7 0
4 years ago
Read 2 more answers
What is output if month = 11 and day = 14?
goldfiish [28.3K]

Cheese

…………………………..tggggggcfcgvgvv

4 0
3 years ago
Read 2 more answers
There is one clear definition of IT. True False
Elenna [48]

Answer:

That is False. it has more definitions not only one.

8 0
3 years ago
Other questions:
  • What symbol following a menu command lets you know that a dialog box will be displayed?
    14·1 answer
  • Declare an array reference variable, week, and initialize it to an array containing the strings "mon", "tue", "wed", "thu", "fri
    15·1 answer
  • How can volunteering to help plan a fundraiser for your team or club be a way to develop your strengths?
    10·2 answers
  • 2. Does the government have the right to tell you what religion you should follow? Why or why not?
    9·2 answers
  • Computer Architecture
    7·1 answer
  • A vehicle equipped with an electronically shifted transaxle stalls whenever slowing to a stop after being driven over 20 miles (
    15·1 answer
  • Write a program that echos back any inputted integer greater than 1, and exits when a 0 is entered. Your program should use a co
    11·1 answer
  • What strategies do you use to better understand difficult reading material? Check all that apply.
    5·1 answer
  • Ali has created a small program in Python, but he wants to store his data in a multi-dimensional array. He would like to use adv
    8·1 answer
  • To keep files organized, related documents are often stored in ____ (also called directories) located on the storage medium.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!