Answer:
- public class Square {
- public static boolean isPerfectSquare(int n){
- int sqrt_n = (int) Math.sqrt(n);
- if(sqrt_n * sqrt_n == n ){
- return true;
- }else{
- return false;
- }
- }
- }
Explanation:
Firstly, use sqrt method from Math package to calculate the square root of input n (Line 3). Cast the result to integer and assign it to sqrt_n variable.
Next, square the sqrt_n and check if it is equal to input n (Line 4). If so, return true, if not, return false (Line 4-8).
Cloud computing is making hardware, software and data available on demand via a network.
The cloud stands for a network that, with all the computers connected to it, forms a kind of 'cloud of computers', where the end user does not know how many or which computer the software runs on or where those computers stand exactly.
In this way, the user no longer needs to be the owner of the hardware and software used and is therefore not responsible for maintenance. The details of the information technology infrastructure are hidden from view and the user has his own virtual infrastructure, scalable in size and possibilities.
Learn more in brainly.com/question/8645052
Answer:
See explaination for code
Explanation:
int x, y;
ifstream numbers;
numbers.open ("numbers.txt");
ofstream min;
min.open ("min.txt");
ofstream max;
max.open ("max.txt");
while(numbers>>x>>y )
{
if(x>y)
{
max<<x<<endl;
min<<y<<endl;
}
else
{
max<<y<<endl;
min<<x<<endl;
}
}
numbers.close;
min.close;
max.close;
Answer:
5, 10 and 16
Explanation:
The sum of their ages is √961 = 31
If Joe is x years old, the equation that follows is:
x + (x+5) + (x+5+6) = 31
This simplifies to
3x = 31 - 11 - 5 = 15
so x=5
From that you can find
Joe = x = 5
Kate = x+5 = 10
Jody = x+5+6 = 16