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
dedylja [7]
3 years ago
7

Write a program that prompts the user to input a positive integer. It should then output a message indicating whether the number

is a prime number. (Note: An even number is prime if it is 2. An odd integer is prime if it is not divisible by any odd integer less than or equal to the square root of the number.)
Computers and Technology
1 answer:
mafiozo [28]3 years ago
8 0

// Writing a c++ program

// Making a variable to take input

int input=0;

cout<<"Enter the number ";

cin>>input;

// checking if the entered number is positive and not 0

if(input>0){

// if the mode of number with 2 is 0 then it is Even

 if(input%2==0)

      cout<<"The number is prime.";

// if mode is 1 then its ODD

 else if(input%2==1)

        cout<<"The number is ODD.";

}

You might be interested in
What is the technique used to divide information sets into mutually exclusive groups such that the members of each group are as
mars1129 [50]

Answer:

C. Cluster analysis

Explanation:

<em>Cluster analysis </em>or clustering is the task of grouping a set of objects in such a way that objects in the same group are more similar to each other than to those in other groups.

This statistical method is used to group similar objects into respective categories by <em>identifying trends and patterns</em>.

Cluster analysis is typically used in the <em>exploratory phase of research </em>when the researcher does not have any per-conceived hypotheses. It is commonly not the only statistical method used, but rather is done in the early stages of a project to help guide the rest of the analysis.

5 0
4 years ago
Which key is pressed to go to the last slide in a slide show?
elixir [45]
Which key is pressed to go to the last slide in a slide show? End key
7 0
4 years ago
Read 2 more answers
Choose the correct completion: Services and APIs are enabled on a per-__________ basis.
Ghella [55]

Answer:

the answer to the fill-in is <em>project. </em>

Explanation:

4 0
3 years ago
Question 2 of 10
Roman55 [17]

Answer:

C

Explanation:

correct answer

3 0
3 years ago
My feelings alwayss T-T
Montano1993 [528]
It’s ight brodie:)))
3 0
3 years ago
Read 2 more answers
Other questions:
  • An agile team used planning poker to estimate user stories. After all team members read a user story, the facilitator asks every
    7·1 answer
  • DeShawn uses Google Ads. He wants to enable website call conversion tracking so he can see how his current ad campaign is drivin
    12·1 answer
  • "Because Standard Error and Standard Ouput represent the results of a command and Standard Input represents the input required f
    6·1 answer
  • Keystroke loggers are stealth software packages that are used to monitor keyboard activities. Which is the best location to plac
    7·1 answer
  • Select the two statements below that are true. Press on the info button for
    13·1 answer
  • You are in charge of five software development projects. The ‘characteristics’ of each of your projects are as follows:
    6·1 answer
  • Sound technology has been influenced the most by the ___.
    5·2 answers
  • 4 function of scanner ​
    8·2 answers
  • which type of virtual machine (vm) takes advantage of unused capacity in data centers at a much lower cost than regular vms of s
    5·1 answer
  • What are the key constructs of a G&amp;T Value Delivery objective?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!