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
oee [108]
3 years ago
11

Write a boolean method that checks whether a given positive integer n is a perfect square. Use Math’s sqrt and round methods to

find the square root of n, round it, then square the result and compare with n. Do not use any iterations or recursion.
Computers and Technology
1 answer:
svetoff [14.1K]3 years ago
5 0
In java...

public boolean checkSquare(int n){

int actualNumber = n;
int squareRoot = (int)Math.sqrt(n);
int squaredNumber = Math.pow(squareRoot,2);

if(squaredNumber==actualNumber){
return true;
} else {
return false;
}

}
You might be interested in
Write a C++ Programm in which inheritance is used
geniusboy [140]

Answer:

// C++ program to demonstrate inheritance

#include <iostream>

using namespace std;

// base class

class Animal {

  public:

   void eat() {

       cout << "I can eat!" << endl;

   }

   void sleep() {

       cout << "I can sleep!" << endl;

   }

};

// derived class

class Dog : public Animal {

  public:

   void bark() {

       cout << "I can bark! Woof woof!!" << endl;

   }

};

int main() {

   // Create object of the Dog class

   Dog dog1;

   // Calling members of the base class

   dog1.eat();

   dog1.sleep();

   // Calling member of the derived class

   dog1.bark();

   return 0;

}

8 0
3 years ago
Do you watch markiplier?
ki77a [65]

Answer: Yes

Explanation: He is cool

5 0
3 years ago
Read 2 more answers
A developer designed a process in UiPath Studio that is best-suited for a simple and linear process. Which Studio workflow type
Gala2k [10]

Question options:

State Machine

Flowchart

Sequence

Global Exception Handler

Answer:

Sequence

Explanation:

Uipath is an RPA(Robotic process automation) software that is used by IT professionals and business executives in automating routine or iterative tasks in an organization. Uipath process projects incorporate different workflow types which include :sequence, flowchart, state machine and global exception handler. The sequence workflow type is used for simple linear projects that are not very complex and occupies a single activity block.

3 0
2 years ago
The darker shadow of an eclipse is called the penumbra.<br><br> True<br><br> False
Kryger [21]
The correct answer for your  question is true, Hope this helps
8 0
3 years ago
_______ are useful when you want the user to select one choice from several possible choices. Radio buttons Check boxes Buttons
gtnhenbr [62]

The radio buttons are used when only one option is to be selected from the several possible choices. Thus, option A is correct.

<h3>What are radio buttons?</h3>

Radio buttons can be understood as the elements of selection a single option amongst the multiple suitable options. The default icon for the radio buttons is the blank circle.

Therefore, option A Radio buttons is correct.

Learn more about radio buttons, here:

brainly.com/question/14316393

#SPJ1

4 0
2 years ago
Other questions:
  • An app builder wants to show groups as the last navigation menu item in the Salesforce1 mobile app. However, the app builder is
    8·1 answer
  • _________function tells the cin object to skip one or more characters in the keyboard buffer.
    11·1 answer
  • Graphic software task​
    7·1 answer
  • 17. Ano ang tawag sa pahina ng Excel?
    12·1 answer
  • .- Una tienda de vestidos de fiesta, ofrece un descuento a las personas
    15·1 answer
  • Give an explanation of one network connection (it will every helpful​
    13·1 answer
  • What is draft pls help me​
    15·2 answers
  • The code to perform a binary search is below. Match the variable name with what it holds.
    12·1 answer
  • Please can someone solve this question<br>What is a software and types of software​
    11·1 answer
  • a) consider the binary number 11010010. what is the base-4 representation of (11010010)2? (there is a way to do this without con
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!