Answer:
input number
calculate modulus of the number and 5
compare outcome to 0
if 0 then output "divisible by 5"
else output "not divisible by 5"
Explanation:
The modulo operator is key here. It returns the remainder after integer division. So 8 mod 5 for example is 3, since 5x1+3 = 8. Only if the outcome is 0, you know the number you divided is a multiple of 5.
Answer:
// here is code in C++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variables Declaration and initialization
int no_gallon=16;
int dis=312;
// find the miles per gallon
double mile_gallon=dis/double(no_gallon);
// print the results
cout<<"number of gallons: "<<no_gallon<<endl;
cout<<"distance travel before refueling: "<<dis<<endl;
cout<<"miles per gallon is: "<<mile_gallon<<endl;
return 0;
}
Explanation:
Declare and initialize the number of gallon and distance travel without refueling. Calculate the miles per gallon by dividing distance with number of gallons.Then print the results.
Output:
number of gallons: 16
distance travel before refueling: 312
miles per gallon is: 19.5
Answer:
the CPU utilization decreases as the degree of multiprogramming is increased.
Explanation:
The fundamental concept is that allocating a process with too few frames causes too many and frequent page faults. This implies that the CPU does not perform any useful work and thus its utilization would decrease drastically. In this case, the long-term scheduler, in a bid to improve the utilization of the CPU, would load more processes into the memory so as to increase the extent of multiprogramming. As a result, there would be more decrease in the utilization of the CPU, leading to a chained reaction of higher page faults, which is then followed by a corresponding increase in the multiprogramming degree, usually known as thrashing.
Answer: 32 bit number
Explanation:
The IP address basically contain 32 bit number as due to the growth of the various internet application and depletion of the IPV4 address. The IP address basically provide two main function is that:
- The location addressing
- The network interface identification
The IP address are basically available in the human readable format. The IPV6 is the new version of the IP address and its uses 128 bits.
Answer:
x^2 * b^2
Explanation:
Like 3 squared times 2 squared is 3*3*2*2. Similarly the expression given in the question is equal to x*x*b*b. And that explains what is mentioned in question.