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
Write an application that uses String method region-Matches to compare two stringsinput by the user. The application should inpu
SOVA2 [1]

Answer:

Explanation:

The following program creates a function called region_Matches that takes in two strings as arguments as well as an int for starting point and an int for amount of characters to compare. Then it compares those characters in each of the words. If they match (ignoring case) then the function outputs True, else it ouputs False. The test cases compare the words "moving" and "loving", the first test case compares the words starting at point 0 which outputs false because m and l are different. Test case 2 ouputs True since it starts at point 1 which is o and o.

class Brainly {

   public static void main(String[] args) {

       String word1 = "moving";

       String word2 = "loving";

       boolean result = region_Matches(word1, word2, 0, 4);

       boolean result2 = region_Matches(word1, word2, 1, 4);

       System.out.println(result);

       System.out.println(result2);

   }

   public static boolean region_Matches(String word1, String word2, int start, int numberOfChars) {

       boolean same = true;

       for (int x = 0; x < numberOfChars; x++) {

           if (Character.toLowerCase(word1.charAt(start + x)) == Character.toLowerCase(word2.charAt(start + x))) {

               continue;

           } else {

               same = false;

               break;

           }

       }

       return same;

   }

}

3 0
3 years ago
What is one way that Accenture helps clients ensure fairness when applying AI solutions?
telo118 [61]

Answer: Accenture is developing a tool to help businesses detect gender, racial and ethnic bias in artificial intelligence software. 5 It lets users define the data fields they consider sensitive—such as race, gender or age—and then see the extent to which these factors are correlated with other data fields.

Explanation:

5 0
3 years ago
Input("Enter a number: ")<br> print(num * 9)
tester [92]

Note that in the above case, if a person save the input as num,

this will print the input 9 times.

<h3>How do you go about this code?</h3>

Therefore, since there is 9 times:

So

num = input("Enter a number: ")

print(num * 9)

If a person actually want to do a real math calculations, then one need to input needs to be inside the number.

num = float(input("Enter a number: "))

print(num * 9)

This  is one that do not  bring about any errors where the user do not input a number.

Learn more about coding from

brainly.com/question/23275071

#SPJ1

5 0
1 year ago
How to learn computer skills​
weqwewe [10]

Answer:

I dont believe learning computers is a skill but I believe learning it as a passion.

Explanation:

Here's your answer..

Some common computer skills include:

Analytics

Social Media

Graphic Design

Microsoft Office

Spreadsheets

Email Communication

Marketing Automation

Data Visualization

Hope it helps

Pls mark brainliest

6 0
3 years ago
A hacktivist is someone who _______.
andreev551 [17]

Answer:

A hacktivist is someone who <em>hacks computers or Web sites in an attempt to promote a political ideology</em>

Explanation:

Computer hacking is the process in which attacker or outsiders try to access the data of the company or some personnel data to damage the reputation.

Now a days, computer hacking in terms of politics is also adopted by different attackers to damage the reputation of some politician. <em>This type of hacker are called hacktivist.</em>

6 0
3 years ago
Other questions:
  • The World Wide Web consists of interconnected computer networks throughout the world that everyone can use. True or False
    13·2 answers
  • How do computers perform complicated tasks built from simple instructions?
    14·1 answer
  • A cloud implementation engineer successfully created a new VM. However, the engineer notices the new VM is not accessible from a
    8·1 answer
  • What makes this web page look different from a web page that is not adapted for mobile
    14·1 answer
  • When an attacker promotes themselves as reputable third-party advertisers to distribute their malware through the Web ads,
    15·1 answer
  • If you were to mount a nonmetallic box to the front of a stud, what type of bracket should the box have? A. FP B. BP C. NP D. JP
    13·1 answer
  • python Write a program that will take a file named Celsius.dat that contains a list of temperatures in Celsius (one per line), a
    9·1 answer
  • Maria wants to create an image for a Web page. Maria should use _____. help me
    8·2 answers
  • Area Triangolo Rettangolo in c++
    6·1 answer
  • Animals living in burrows under the ground is an interaction between the biosphere and the
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!