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
Sav [38]
3 years ago
11

Write a Function procedure that determines whether a given Integer is divisible by 5 or not. The function should accept one argu

ment having a data type of Integer and return True if that Integer is divisible by 5, False otherwise.
Computers and Technology
1 answer:
oee [108]3 years ago
6 0

Answer:

bool isdivisor(int x) // function definition

{

 if(x%5==0) // check Integer is divisible by 5

 {

   return true;

 }

 else

 {

   return false;

 }

}

Explanation:

#include <iostream>// header file

using namespace std; // using namespace std;

bool isdivisor(int num); // prototype

int main() // main function

{

   bool t; // bool variable

   int num; // variable declarartion

   cout<<" enter the num:";

   cin>>num; // input number

  t=isdivisor(num); // calling

  if(t)

     cout<<" number is divisible by 5 ";

     else

     cout<<" number is not divisible by 5";

     return 0;

}

   bool isdivisor(int x) // function definition

{

 if(x%5==0)

 {

   return true;

 }

 else

 {

   return false;

 }

}

Output:

enter the num:50

number is divisible by 5

Explanation:

In this program we have a declared a Boolean function i.e isdivisor that accept one argument of type int.

check if(x%5==0) it return true otherwise false .

You might be interested in
In the Application, "The Effect of FDI on Rentals and Wages in Singapore," the annual growth rate in real rental rates for the 1
stellarik [79]

Answer:

Explanation:

Production function: In simple words, production function refers to the functional relationship between the quantity of a good produced (output) and factors of production (inputs).

Production function: In simple words, production function refers to the functional relationship between the quantity of a good produced (output) and factors of production (inputs).

FDI: A foreign direct investment is an investment in the form of a controlling ownership in a business in one country by an entity based in another country.

  • Singapore has encouraged foreign firms to establish subsidiaries within its borders, especially in the electronics industry.
  • Singapore has the fourth-largest amount of FDI in the world.
  • What has happened to the rental rate and the wage?
  • Find in the attachment a table which shows much of this.
  •    The annual growth rate in rental rates for the 1970-1990 period using the production function and marginal product was -5%.
6 0
3 years ago
ARP only permits address resolution to occur on a single network.could ARP send a request to a remote server in an IP datagram?w
romanna [79]

Answer:

The answer to this question is Yes it is possible

Explanation:

It can be done In the case where a special server is required in each network that would forward the request to the  remote ARP(Address Resolution Protocol) server and will receive the response from the server and send it to the requesting host.So we conclude that we can do that hence the answer is Yes.

5 0
3 years ago
Which of the following statements best describes O*NET OnLine?
irakobra [83]

The process that aids managers to better understand the processes through which they are performed most effectively by gathering and organizing detailed information about various jobs within an organization so that is called Job analysis and is performed by a job analyst in an organization. Occupational Information Network (O*Net) is a database that provides both basic and advanced job-analysis information; as such, IT can be viewed as an alternative to conducting job analysis. O*NET OnLine has detailed descriptions of the world of work for use by job seekers, workforce development and HR professionals, students, researchers, and more. It is a tool for career exploration and job analysis.

 

 

 





8 0
2 years ago
Requests to access specific cylinders on a disk drive arrive in this order: 24, 20, 4, 40, 6, 38, and 12, and the seek arm is in
GarryVolchara [31]

Answer:

The time required to seek using First come,first served algorithm is 876 milliseconds.

The time required to seek using Shortest Seek Time First algorithm is 360 milliseconds.

The time required to seek using LOOK (initialing moving upwards) algorithm is 348 milliseconds.

Explanation:

Part a,b : First-come, first-served:

The order of the cylinders is as 10, 22, 20, 2, 40, 6, 38

10 + 12 + 2 + 18 + 38 + 34 + 32 = 146 cylinders = 876 milliseconds.

ii) Shortest Seek Time First:

The order of the cylinders is as 20, 22, 10, 6, 2, 39, 40

0 + 2 + 12 + 4 + 4 + 36 + 2 = 60 cylinders = 360 milliseconds.

iii) LOOK (initialing moving upwards):

The order of the cylinders is as 20, 22, 38, 40, 10, 6, 2

0 + 2 + 16 + 2 + 30 + 4 + 4 = 58 cylinders = 348 milliseconds.

7 0
3 years ago
Because assembly language is so close in nature to machine language, it is referred to as a ____________.
Travka [436]

Answer:

low-level language.

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following can be created when two tables contain a common field?
    14·1 answer
  • An example of an electrical insulator is _____.
    15·1 answer
  • Is it better to meet online or offline<br> (Please answer QUICK)<br><br> Thanks :')
    5·2 answers
  • i set up an account and paid the yearly fee, now it's asking me to join. i've tried to log in and brainly isn't accepting my ema
    8·1 answer
  • Help please
    13·2 answers
  • Each student has a record on a file consisting of the following data: Student last name, Student ID (numeric), GPA (a decimal nu
    7·1 answer
  • In this exercise we will practice using loops to handle collections/containers. Your job is to write a program that asks the use
    6·1 answer
  • Actividades que puedes Aser con un martillo y su explicación
    8·1 answer
  • In what medium do web applications operate?
    8·1 answer
  • Addition substraction and multiplication are examples of the set of _____ provided by the int data type
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!