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
Write a application that can determine if a 5 digit number you input is a palindrome. If the number is a palindrome then print "
notsponge [240]

Answer:

Written in Python:

num = int(input("Number: "))

strnum = str(num)

if len(strnum) !=5:

    print("Length must be 5")

else:

    if(strnum[::-1] == strnum):

         print("The number is a palindrome.")

    else:

         print("The number is NOT palindrome.")

Explanation:

This prompts user for input

num = int(input("Number: "))

This converts user input to string

strnum = str(num)

This checks the length of the string

if len(strnum) !=5:

    print("Length must be 5") If length is not 5, this prompt is printed

else:If otherwise

    if(strnum[::-1] == strnum): The compares the string reversed with the original

         print("The number is a palindrome.") If both are the same, this line is executed

    else:

         print("The number is NOT palindrome.") If otherwise, this line is executed

4 0
3 years ago
Kim is writing a sql query that will pull a list of customers with outstanding orders and the sales rep for each order. What sho
Step2247 [10]

What the phrase should say in Kim's SQL Query is;  WHERE Customer = Sales Rep

<h3>What is SQL Query?</h3>

Structured Query Language (SQL) is defined as a standardized programming language that is used to manage relational databases and perform various operations on the data in them.

Now in SQL Query, when one SQL query is embedded in another SQL query to simulate a join, the second SQL query is embedded in the "WHERE" of the first query.

Since the query will pull a list of customers with outstanding orders and the sales rep for each order. Then, the where phrase will be;

WHERE Customer = Sales Rep

Read more about SQL Query at; brainly.com/question/10097523

6 0
2 years ago
Can someone let me join your kingdom if anybody knows this game and plays it as well. ​
Assoli18 [71]

Answer:

sure is called voxetas

Explanation:

7 0
3 years ago
Please complete the following questions. It is important that you use complete sentences and present the questions and answers w
Vanyuwa [196]

Answer:

well... i came for the same answer

Explanation:

7 0
3 years ago
Read 2 more answers
Which of the following correctly stores 45 squared in the variable x?
timama [110]

Answer:

x = 45

x = x ** 2

6 0
3 years ago
Other questions:
  • Alison retrieved data from a company database containing personal information on customers. When she looks at the SSN field, she
    14·1 answer
  • Investments in data networks, ip addresses, routers, and switches are ________ because of their impact on productivity, security
    14·1 answer
  • A ____ by a design professional is used to determine the best system to provide the appropriate level and type of protection.
    6·1 answer
  • While doing research on the Internet, what kind of website should you avoid because the information may be biased? A) .org. B) .
    15·2 answers
  • Write an expression using membership operators that prints "Special number" if special_num is one of the special numbers stored
    12·1 answer
  • To create a pull quote, how should a user format the text?
    6·2 answers
  • Which command can be used to find errors on a hard drive​
    6·1 answer
  • 17. When an industrial electrical circuit requires a 220 VAC single phase power supply, the electric power supply circuit is nor
    7·1 answer
  • 7.4 Lesson Practice (projectstem): what is output if the user is enters 2?​
    8·1 answer
  • What is a disadvantage of communicating on social media?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!