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
olya-2409 [2.1K]
3 years ago
14

g Design a Boolean function called isPrime, that accepts an integer as an argument and returns True if the argument is a prime n

umber, or False otherwise. Use the function in a program that prompts the user to enter a number and then displays a message indicating whether the number is prime. The following modules should be written
Computers and Technology
1 answer:
professor190 [17]3 years ago
4 0

Answer:

#include <bits/stdc++.h>

using namespace std;

bool isPrime(int n)

{

   for(int j=2;j<=n-1;j++)  //loop to check prime..

   {

       if(n%j==0)

       return false;

   }

   return true;

}

int main(){

   int n;

   cout<<"Enter the integer"<<endl;//taking input..

   cin>>n;

   if(isPrime(n))//printing the message.

   {

       cout<<"The number you have entered is prime"<<endl;

   }

   else

   {

       cout<<"The number is not prime"<<endl;

   }

return 0;

}

Output:-

Enter the integer

13

The number you have entered is prime

Explanation:

The above written program is in C++.I have created a function called isPrime with an argument n.I have used a for loop to check if the number is prime or not.In the main function I have called the function isPrime for checking the number is prime or not.

You might be interested in
Which description of the plain text file format is most accurate?
dsp73
1. uses binary code to store data!
4 0
3 years ago
Read 2 more answers
A good look of a web page depends upon?​
GuDViN [60]

Answer: See explanation

Explanation:

• Font size: The font size used matters a lot in order to enhance readability. The ideal font size should be 16 pixel for the main body text. This is vital in order to help enhance readability. It should be noted that a don't size that is lower or higher than that can lead to challenges with readability.

• Graphics and animation: Using of exciting graphics and animations on a website can help in giving the web page a good look, help in grabbing the attention of the user, and also increase engagement.

• Use of colours: The color chosen also helps to give a web page a good look. It should be noted that when choosing colors, it is ideal to choose two or at most three colors to use for a web page. Mixing different colors or using very bright colors is typically a turn off.

8 0
3 years ago
If Twitter were to exclusively use e-mail, collaborative computing, and other computer connections to connect geographically sep
sweet-ann [11.9K]

Answer:

Virtual is the correct answer for the above question.

Explanation:

A Virtual organization is a collection which is used to connect the geographical people, organizational units, employees, individuals and groups for some communication purpose. Virtual means that there is some existence like physically but it is not physically present. So the organization also connects the person and gives the real scenario with the help of some software for communication.

The question states that if twitter uses email and other computing connections to connect people globally then it comes in the Virtual department because it follows the concept of the virtual department. Hence Virtual is the correct answer.

5 0
3 years ago
How to turn off do not disturb on iphone for a contact.
Tresset [83]

Answer:

Okay so you turn your phone on scroll up and it well show everything click the moon and on the side of your phone there is alittle swice turn it right

Explanation:

3 0
2 years ago
Read 2 more answers
You right-click a Server Core server in Server Manager and click Computer Management. You see an error indicating that the serve
Anarel [89]

Answer:

Configure Windows Firewall on the remote computer.

Explanation:

3 0
3 years ago
Other questions:
  • Rachel works in a bank. She wants to present the idea of implementing an IS to the management. How should Rachel describe the IS
    9·2 answers
  • "the ____ criteria filter requires the records displayed to have the specified text string anywhere."
    11·1 answer
  • Schools are businesses that need to install software on a large number of computers can usually obtain a ______
    13·1 answer
  • Which of the following was not important in the development of the internet?
    10·2 answers
  • Effective character encoding requires:
    8·1 answer
  • give your opinion on if you would trust your accounts with an online bank. Explain why or why not. MANY people do not. MANY peop
    14·2 answers
  • Which command suppresses the visibility of a particular row or column in a worksheet?
    13·1 answer
  • Which of these trade-offs occur in a memory hierarchy?
    15·1 answer
  • A subroutine may be used to refer to which of the following? Check all that apply.
    15·2 answers
  • I'm skeptical about (b) , is this accurate or the ranges should be listed differently ?​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!