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]
4 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]4 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 2-3 sentences, describe a case where circuit-switching is better than packet-switching?
cupoosta [38]
Because electricity powers everything , electricity can do anything
6 0
3 years ago
Please tell me about Advantages and disadvantages of technology development​
hoa [83]

Answer:

idkidkkkkkkkkkkkkkkkkk

3 0
3 years ago
Read 2 more answers
Fill in the black
iogann1982 [59]

Answer:

information processing is concerned with recording arranging processing retrieving and disseminating of information

4 0
3 years ago
What is the intranet?
Verdich [7]
The internet links you to websites that you need.
8 0
3 years ago
Which statement is true about the elements of the interface of a presentation program?
Anton [14]
<span>C. Rulers indicate the margins, tabs, and indents in a presentation slide.
</span>
6 0
3 years ago
Read 2 more answers
Other questions:
  • PriQueue inherits from Queue. In the implementation of the getMax() method in the PriQueue class, we need to read and write the
    5·1 answer
  • What is the on board storage C:
    15·1 answer
  • . What is the difference between subnetting and supernetting?
    13·1 answer
  • Technology can most broadly be defined as anything that does which of the following ?
    11·1 answer
  • Your mother is sure that you were driving too fast because she knows
    10·2 answers
  • Which term describes the order of arrangement of files and folders on a computer?
    10·1 answer
  • Who designed analatic engine in the 1930's?​
    10·1 answer
  • You are using a PowerPoint template from your school to present your research findings in front of the class. What would you do,
    13·2 answers
  • THis took FOREVER! please go check it out, if you have seen my demo to this game, you will like the full version! https://scratc
    9·2 answers
  • What sets Web pages apart from other documents is that they contain a special kind of text called ___, which is document text th
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!