How to square a number in java.

Answers

Answer 1

Answer:

num**2

Explanation:

To square a number in Java, you just take the number and use two asterisks (**) to denote an exponent, and then connect a 2 to it.

For example, if your number is 5:

5**2 in Java means 5^2, which is 25.

Just like how 5**3 in Java means 5^3.

Hope this helps.


Related Questions

How to emit from jquery in angular 8.

Answers

Answer:

idek what you just said

helpppppppppppppppppppppppppppppppppppppppppppppppppppp

Answers

Answer:

I would say B.

Explanation:

It seems the most logical. :)

Consider the following instance variables and method from a class: private String descriptor; public String makeSentence(int quant, boolean sign) { String s = "Object is "; if (!sign) { s += "not "; } for (int i = 0; i < quant; i++) { s += "very "; } return s + descriptor; } Suppose an object of this class is initialized so the value of descriptor is "regular". What would be returned by the call makeSentence(3, false) made on this object?

Answers

The call makeSentence(3, false) will return

"Object is not very very very regular"

The program fragment is:

///////////////////////////////////////////////////////////////////////////////////////////////////////////////

private String descriptor;

public String makeSentence(int quant, boolean sign) {

   String s = "Object is ";

   if (! sign) {

       s += "not ";

    }

   for (int i = 0; i < quant; i++) {

       s += "very ";

   }

   return s + descriptor;

}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////

descriptor is an instance field of the class. When makeSentence(3, false) is called, it does the following;

Initializes a local variable s with "Object is "

s now contains "Object is "

Since sign== false, the if block executes

s now contains "Object is not "

The for loop will execute 3 times to append "very " to s

s now contains "Object is not very very very "

Finally the return statement returns a concatenation of the contents of descriptor (descriptor=="regular") and s

s now contains "Object is not very very very regular"

Learn more about programs here: https://brainly.com/question/19625875

with which type of satellite is there a propagation delay?

Answers

Geostationary satellites have a high propagation delay.

what is a common indicator of a phishing attempt cyber awareness 2022

Answers

There are several types of malicious document. A common indicator of a phishing attempt cyber awareness 2022 is that It includes a threat of dire circumstances.

Phishing attacks often makes use of email or malicious websites to infect the machine with malware and viruses so as to collect personal and financial information.

Cybercriminals often uses different means to lure users to click on a link or open an attachment that infects their computers thereby producing vulnerabilities for criminals to use to attack.

Learn more from

https://brainly.com/question/24069038

How can middleware be used in angular.

Answers

Answer:

when a rquest comes in to the application

jelaskan tiga kemungkinan sebab pengasah pensil itu tidak dapat berfungsi secara tiba-tiba (translate: explain three possible reasons why the pencil sharpener may not work suddenly) pls help me​

Answers

Explanation:

Internal gear wear must be significant (visually obvious) to be the cause of off-center sharpening. Cutter carrier is rotating but the pencil is not sharpening (doesn't feel like the cutter is engaging the pencil) This is usually caused by a foreign object (e.g., an eraser or broken pencil lead) inside the pencil bore.

Distributions of links in most networks follow a(n) __________ rule. radio_button_unchecked 60/40 radio_button_unchecked 90/10 radio_button_unchecked 50/50 radio_button_unchecked 80/20 SUBMIT

Answers

In most computer networks, the distribution of links follow an: 80/20 rule.

A network can be defined as a set of interconnected computer systems (nodes) and the relational ties linking the computer systems together.

An 80/20 rule is also referred to as the Pareto Principle and it can be defined as a concept in cybersecurity, which states that there exist an unequal relationship between outputs and inputs, in the ratio of 80 percent to 20 percent respectively.

In most computer networks, the distribution of links follow an 80/20 rule by rationalizing the amount of traffic that must enter into a network (20 percent) with respect to the amount of traffic that must exit the network (80 percent).

Read more: https://brainly.com/question/22365112

Why do
ve need to add movies in our slide?

Answers

Answer:

movies are awesome! LOL but i dont understand your question...sadly.

Explanation:

Type the correct answer in the box. Spell all words correctly. Define the term loop rule. The loop rule tells us that if we sum the across all the components in a single closed path of an electrical network, the result is 0.

Answers

Answer:

91

Explanation:

When you connect a printer to your computer, ________ allows the operating system to detect the printer to make setup easier.

Answers

Answer:

PnP

Explanation:

A NAND gate is a type of logic gate that produces an output of false only when both of its two inputs are true. Otherwise, the gate produces an output of true. Which of the following Boolean expressions correctly models a NAND gate with inputs P and Q?
a. (NOT P) AND (NOT Q).
b. (NOT P) AND Q.c. NOT (P AND Q).d. NOT (P OR Q).

Answers

A NAND gate combines the NOT gate and the AND gate.

For inputs P and Q, the boolean expression for the NAND gate is c. NOT (P AND Q)

The NAND gate means:

NOT AND

Assume the inputs are x and y, then the formula would be:

NOT (x AND y)

In this case, the input variables are P and Q.

So, we replace x and y with P and Q, respectively.

The formula becomes NOT (P AND Q)

Hence, the correct expression is (c)

Read more about NAND gates at:

https://brainly.com/question/11178154

independence day in school long passage plss​

Answers

Answer:

Independence Day Celebration in My School

Fifteen August, is a red letter day in the history of India. On this day in 1947, our country become free form the long imprisonment of the British rule. Since 1947, fifteenth August is celebrated every year with great joy and pride. It reminds us for the great struggle of our freedom from the British rule. The great sacrifice for our freedom fighters is remembered, which serves as a beacon light for the development of this great country. The main function is held at Red Fort in Delhi where the Prime Minister unfurls the National flag. It is an occasion of celebration for every Indian and the whole nation celebrate a holiday from all work and take a pledge to work whole heatedly for the development of this country and preservation of Independence. All those who have stood out exclusively in their respective field of work are honored in public meetings. The whole nation pays homage to the security forces who have laid down their lives for the honor and security of the country.

We also celebrated the Independence day in our school compound, with great pump and show. The school building and the ground were cleaned and decorated for the occasion. A flag pole was put up at the top of the school building. The seating arrangement was made on the platform. Markings were made on the ground with white lines. The flower pots were kept all along the path.

There was great enthusiasm among students. The school band of students took its position half an hour before the actual function was to began. The members of the band were wearing a beautiful uniform. They began to play sweet tunes. The students had taken their places well before the time. They were all in school uniform, the white paint and white shirt.

The function began exactly at 8 a.m. all who were present stood in attention. The principal unfurled the flag. The petals of rose fell on us. Five boys sang a song in honor of the national flag. It was “Vijayee Vishwa Trianga Payara”. Them by the school band. The principal look the salute. He made an impressive speech and invited the Education Minster to impressive speech and invited the Education Minster to address us. In his address he asked us to take pledge to safeguard the freedom of nation. He also reminded us of great sons of India, Mahatma Gandhi, Pt. Nehru, Subhash Chandra Bose, Lala Lajpat Roy and Chander Shekar Azad and their sacrifices to the nation. After that different groups of students presented a programme of mass drill and pyramid formation. Ever one liked the programme.

In the end, all stood in attention. All the students, teachers and guardians sang the National Anthem in chorus. With this the function was over. Today the memories of this function are as alive to me, as it was on that day.

Consider the following code segment, which is intended to store the sum of all multiples of 10 between 10 and 100, inclusive (10 20 ... 100), in the variable total.
int x = 100;int total = 0;while( /* missing code */ ){total = total + x;x = x - 10;}Which of the following can be used as a replacement for /* missing code */ so that the code segment works as intended?A. x < 100.B. x <= 100.C. x > 10.D. x >= 10.E. x != 10.

Answers

The code segment illustrates the use of while loops

Loops are program statements that are used for repetitive and iterative operations

The missing statement in the code is x>= 0

The code is meant to add numbers from 10 to 100 (inclusive) with an increment of 10.

At the beginning of the program, variable x is initialized to 100, and it is reduced by 10 in the iteration until it gets to 10

So, the condition must be set to stop when the value of x is 10 i.e. x >= 0

i.e. the iteration must be repeated while x is greater than or equal to 10

Hence, the missing statement is (d) x >= 0

Read more about loops at:  

brainly.com/question/16397886

1. What is the value of the digit 2 in the number below?

1,243 (a) 2) (b) 200) (c) 2000) (d) 20

Answers

Answer:

200

Explanation:

Let's split the number 1,243 into its values.

1,000 + 200 + 40 + 3.

To check your answer, add all the numbers together.

_2_ _.

Notice that there are "2" spaces after the 2.

This is why there are 2 zeros in 200.

Therefore, 200 is the answer.

-kiniwih426

Why is remixing so popular with artists and other people online?

A.
It is so popular because remixes are guaranteed to make money.

B.
It requires no skill or special tools to do.

C.
It is a legal loophole that allows them to benefit from other people’s work.

D.
It is a way to be creative without having to construct totally new pieces.

Answers

Answer:

D.It is a way to be creative without having to construct totally new pieces.

Explanation:The answer is -D- because it is true. Remixing is a way of being creative, and you don't have to make completely new pieces.

Answer:

its likely D

Explanation:

remixing allows artists to combine and change different songs without having to actually create a song their-selves

5. The Shape Fill drop-down menu is used to

A b or c or d

Answers

Answer:

Change the color of the shape.

Explanation:

In the sentence, you must look at keywords, like "Fill" and "Shape".

The fact that it said shape fill means the tool would fill the inside of a shape.

Make sure to look at the definition of keywords to figure out what they mean.

Therefore, "Change the color of the shape" would be the correct answer.

-kiniwih426

What genre of games involves gameplay that is designed to simulate real-world or fictionalized activites such as flying a plane or managing a city and often requires resource management?

Simulation games
Puzzle games
Adventure games
Strategy games

Answers

Answer:

simulation games

Explanation:

Simulation games are a broad category of games where gameplay is designed to simulate real-world or fictionalized activities and often require resource management skills.

Answer:

Simulation games

Explanation:

When it is being used to make a telephone call, your smartphone is an example of which part of the communication process

Answers

In the communication process, when your smartphone is being used to make a telephone call, your smartphone is an example of a: medium.

Communication refers to a process which involves the transfer of a message (information) from an individual (sender) to another (receiver), through the use of semiotics, symbols and signs that are mutually understood by both the sender and the receiver.

The Sender Message Channel Receiver (SMCR) model of communication is composed of four (4) main components and these are;

Sender (S).Channel (C) or Medium.Message (M).Receiver (R).

In the communication process, a smartphone which is being used to make a telephone call is an example of a medium or channel because it provides the pathway for the transmission of a message (information) from an individual (sender) to another (receiver).

Read more: https://brainly.com/question/17438207

I need help with this question.

Fill in the blank with the correct response.
When an app seems to have a personality, we say it has ____

Answers

The answer is persona

The ____ design is the process of selecting the data storage and data access characteristics of the database.

Answers

Answer:

The Physical database design is the process of selecting the data storage and data access characteristics of the database.

Question 10 of 10
Your company emphasizes the important of conserving (not wasting)
resources. How can you support that value when you print an 8-page report
you were asked to bring to your department's monthly meeting?
O A. Use the Print option for two-sided printing.
OB. Use the Print option to create extra copies.
C. Post the report online before printing it.
O D. Use the Save option to choose a format readers can open.

Answers

D, because it will save paper and not go to waste

________ programming techniques consist of top-down program design, pseudocode, flowcharts, and logic structures. Group of answer choices Object-oriented Structured Unstructured Content-markup

Answers

Considering the programming layout, Structured programming techniques consist of top-down program design, pseudocode, flowcharts, and logic structures.

Definition of Structured Programming Technique.

This is because Structured Programming techniques are a method that is employed to enhance the reliability and simplicity of the program code.

Configurations of Structured Programming Technique.

Structured Programming Techniques generally takes three structures body which include the following:

IF THEN ELSE DO WHILESequence

Hence, in this case, it is concluded that the correct answer is option B. "Structured."

Learn more about programming techniques here: https://brainly.com/question/17180300

Modems communicate data by using which method?.

Answers

Considering the modem technology, Modems communicate data by using Radio frequency method.

What is Radio frequency method?

The radio frequency method in modem communication allows modems to communicate or transfer data through wireless over a distance of tens of kilometers.

The essence of Radio frequency in modems

With radio frequency, modems can easily communicate without telecommunication or satellite network operators. It usually performs at 300 MHz to 900 MHz range.

Hence, in this case, it is concluded that the correct answer is the Radio frequency method.

Learn more about modem technology here: https://brainly.com/question/9617717

A process that takes plaintext of any length and transforms it into a short code is called Group of answer choices encryption hashing symmetric encryption asymmetric encryption

Answers

Answer:

hashing

Explanation:

A hash can be used in compression which reduces the length of a plaintext sequence

John works as an associate at a construction company. His job is to draft contracts for suppliers. Before he prints the contract, he sends it to his manager so that he can suggest any required changes. Which feature should John’s manager use to make the suggestions?
A.
Spell Check
B.
Track Changes
C.
Comments
D.
Edit

Answers

Answer: D

Hope that helped :)

Who are the primary users of erp systems?.

Answers

Explanation:

resellers, partners, suppliers, and distributors.

Is noreasters the kind of weather that a place has over a long period of time (true)or (false) ?

Answers

It is true hope this helps

ok so I have two accounts and like, the other account has -20 points??? what happened​

Answers

You need to do the questions to get more points

Write a function ComputeVal that takes two integer parameters and returns the product of the two parameters plus 9. Ex: ComputeVal(4, 6) returns 33.

Answers

Answer:

#include <iostream>

using namespace std;

/* Your code goes here */

int main() {

  int input1, input2;

  int result;

 

  cin >> input1;

  cin >> input2;

 

  result = ComputeNum(input1, input2);

 

  cout << result << endl;

  return 0;

Explanation:

Other Questions
The first observation of block oscillation was in a semiconductor superlattice with period 10nm. Which President's domestic policy included putting down the Whiskey Rebellion? Question 7 options: Andrew Jackson George Washington James Madison John Adams the sum of 45+5 is ....... Specialized equipment and or clothing is used to protect participants in armed martial arts. A. True B. False Solve the giving equation 2x-4=24 whats the first step. What is the reciprocal of5/6 What is the proportion of saved disposable income called?savings ratehuman capitalsavingsphysical capital the number of fish in a lake decreasing by 400 every year,as described by the function below. f(1)=8200 f(n+1)=f(n)-400 what will be the value help review my song I wrote it is called FREE TO ME:Feeling fee to some people means run-in away run-in away run-in away but to me it means that nothin is holing you down but if you run away nothing good will come out of that yeah yeah ya ya make a 5 minutes story on memory the distance between two successive peaks is called How to find maxima and minima without derivatives. Serena and Venus are sisters. Venus sold stock to Serena for $5,000, its fair market value. The stock cost Venus $10,000 five years ago. Also, Venus sold Carol (an unrelated party) stock for $2,000 that cost $10,000 three years ago. What is Venus' recognized loss before the $3,000 capital loss limitation? suppose you have $20 in your bank account. you start saving $5 each week. your friend has $5 in his account and is saving $10 each week. assume neither of you make any withdrawals. do you have to kick the extra point in overtime nfl Explain to me, in English, how you are supposed to know whether a verb takes tre or avoir in the pass compos. I mean there are twelve thousand verbs in the French language, so how do you know? * what was the total production of sugarcane in 1910 Which comparison between events in the passage would best support a claim that a significant theme of the passage is fulfillment?. A mountain climber started at zero elevation. The first day he hiked 10 miles up the mountain, the second day it got steeper and only hiked 3 miles, the third day he had to detour and went down 4 miles and the last day he went up 1 mile. How far did he get up the mountain? Susan is concerned about her bone density, so she takes two calcium supplement pills at dinner every night. Due to taking these supplements at the meal, of what other nutrient from her food that is important to immune system support is she absorbing less