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:
My birthday, October 31, 2005, is on Halloween.
Explanation:
"Main" goes in the blank. For example in C++ all of your code goes in the main function.
Answer:
Physical science is the study of the inorganic world. That is, it does not study living things. (Those are studied in biological, or life, science.) The four main branches of physical science are astronomy, physics, chemistry, and the Earth sciences, which include meteorology and geology.
Answer:
La cilindrada total del motor es de 1997,025 centímetros cúbicos.
Explanation:
Para determinar la cilindrada total Vt en un motor de 4 cilindros de 83,6 mm de diámetro por 91 mm de carrera se debe realizar el siguiente cálculo, sabiendo que para calcular la cilindrada de un motor se debe utilizar la fórmula ((Pi x Diámetro^2)/4) x Carrera x Número de cilindros = X:
((3.14 x 83.6^2)/4) x 91 x 4 = X
((3.14 x 6,988.96)/4) x 364 = X
(21,945.3344 / 4) x 364 = X
5,486.3336 x 364 = X
1,997,025.4304 = X
1 milímetro cúbico = 0.001 centímetro cúbico
1,997,025.4304 milímetros cúbicos = 1997.0254304000005 centímetros cúbicos
Por lo tanto, la cilindrada total del motor es de 1997,025 centímetros cúbicos.