Answer:
// here is code in c++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{ // variable to store number of loads
int n;
cout<<"enter the number of servers:";
// read the number of servers
cin>>n;
// create an integer array of servers of size n
int server_load[n];
// read the load of each server
cout<<"enter the loads on each server:"<<endl;
for(int x=0;x<n;x++)
{
cin>>server_load[x];
}
// sort the array
sort(server_load,server_load+n);
int min_diff=MAX_INT;
// find the minimum absolute difference between the server load
for(int y=0;y<n-1;y++)
{
int d=server_load[y+1]- server_load[y];
if(d<min_diff)
min_diff=d;
}
// print the minimum difference
cout<<"minimum absolute difference of server load is: "<<min_diff<<endl;
return 0;
}
Explanation:
Read the number of servers from user and assign it to "n".Create an integer Array of size n to store the load on each server.Read the load of each server and store in the array. Sort the array. Then find the minimum difference between two load of servers. Print the minimum difference.
Output:
enter the number of servers:6
enter the loads on each server:
12 45 5 9 3 24
minimum absolute difference of server load is: 2
Answer:
d
Explanation:
all of this. all of this can happen due to stress
The question is not influenced by the fact that it's about intelligence - standard deviation is a way of describing data and it's the same for all kinds of data.
So in general, one standard deviation away from the mean in both directions encompases around 66% of the cases - so here it would be 66% of children.
Additionally, 95% of all children should lie withing two standard deviations - so two standard deviations below or above the average.
Answer:
yes a computer can evaluate expressions depends on the computer for the maybe expression
Explanation:
Answer:
Following are the code to this question:
def binarynumber(num):#defining a method binarynumber that accepts a parameter num
x=""#defining a string variable x
if (num!=0):#defining if condition to check number not equal to 0
while (num>=1):#defining a loop that check value is grater then equal to one
if (num %2==0):#defining if condition to check num is even
x=x+"0" #add string value 0 in num variable
num=num/2 #divide the value by 2
else:#defining else block
x=x+"1"#add string value 1 in num variable
num=(num-1)/2#first subtract 1 into num variable then divide the value by 2
else:
x="0"#assign string value 0 in num variable
return "".join(reversed(x))#return value
num = int (input ("Enter any number: "))#defining num variable that input the integer value
print (binarynumber(num))#using print method to call method binarynumber with passing num parameter
Output:
Enter any number: 12
1100
Explanation:
- In the above python code a method "binarynumber" is declared, in which the "num" variable passes as the parameter inside the method a string variable "x" is declared that stores all converted values.
- Inside the method and if the block is declared that checks number value is not equal to 0 if this condition is false then it will add string value and reverse its value.
- Or if the condition is true it defines a while loop that calculates the given number binary digits and returns its value.
- At the last step, the num variable is declared that inputs the integer value from the user end and calls the method by using the print method.