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
julsineya [31]
3 years ago
5

HAS ANYONE SEEN THIS FROM BRAINLY BEFORE

Computers and Technology
2 answers:
FromTheMoon [43]3 years ago
4 0

Answer:

yes that's what happened to me!

Explanation:

algol [13]3 years ago
4 0

Answer:

That just happened to me lol

You might be interested in
What happens if i unplug my alarm system?
Dafna11 [192]
It loses power and most likely stops working
6 0
3 years ago
Write a program that prompts the user to enter in a postive number. Only accept positive numbers - if the user supplies a negati
marusya05 [52]

Answer:

The c++ program to check prime numbers is shown below.

#include <iostream>

using namespace std;

int main() {

   int num, prime=0;

   do

   {

       cout<<"Enter a positive number."<<endl;

       cin>>num;

       if(num<1)

       {

           cout<<"Invalid number. Enter a positive number"<<endl;

           cin>>num;

       }

   }while(num<1);

   

   if(num==1 || num==2 || num==3)

       cout<<num<<" is a prime number."<<endl;

   else if(num%2 == 0)

       cout<<num<<" is not a prime number."<<endl;

   else

   {

       for(int k=3; k<num/2; k++)

       {

           if(num%k == 0)

               prime++;

       }    

   if(prime>1)

       cout<<num<<" is not a prime number."<<endl;

   else

       cout<<num<<" is a prime number."<<endl;

   }

}

OUTPUT

Enter a positive number.

-7

Invalid number. Enter a positive number

0

Enter a positive number.

79

79 is a prime number.

Explanation:

The user input is validated for positivity. A do while loop along with an if statement is implemented for verification.

do

   {

       cout<<"Enter a positive number."<<endl;

       cin>>num;

       if(num<1)

       {

           cout<<"Invalid number. Enter a positive number"<<endl;

           cin>>num;

       }

   }while(num<1);

The test for prime number is done by using multiple if else statements.

If user inputs 1, 2, or 3, message is displayed.

Else If user inputs an even number, message is displayed for not prime. This is done by taking modulo of the number upon division by 2.

Else if user inputs neither an even number nor a number less than 3, the modulus of the number is taken with divisors beginning from 3 up to half of the input number.

For this, an integer variable prime is initialized to 0. A number can be completely divisible by itself or by its factors.

If the number is divisible by any of the divisors, value of variable prime is increased by 1. If value of prime is greater than 1, this means that the user input is divisible by more than one divisor. Hence, the given number is not a prime number.

5 0
3 years ago
The small, touch-sensitive area at the base of the keyboard on a notebook computer is known as a ________.
USPshnik [31]
Trackpad.

(Sheep sheep mr sheep meep)
8 0
3 years ago
Read 2 more answers
Many financial experts advise that property owners should insure their homes or buildings for at least 80 percent of the amount
serious [3.7K]
All I will say is good luck. because it can be very difficult to find someone that is willing to do this.
5 0
3 years ago
What was named the worst game ever?
Schach [20]

Answer:

Fortnight

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • You have been doing a lot of web surfing lately as part of your research for your course and along the way you have noticed a gr
    14·1 answer
  • Sarah is entering weekly sales data for week 37 of the current year; however, when she moves down to thecells where she needs to
    8·2 answers
  • A short-circuit evaluation is where each part of an expression is evaluated only as far as necessary to determine whether the en
    14·1 answer
  • What are two examples of management information systems?
    12·1 answer
  • What features are offered by most of the email programs with for receiving and sending messages?
    10·1 answer
  • Yall rachits and yall eat butt xD
    10·2 answers
  • _____ of a global information system (GIS) concentrates on medium-range activities that move an organization toward achieving lo
    7·1 answer
  • What is the best way to pay for college?
    9·2 answers
  • Help me guys plssssss​
    10·1 answer
  • Which type of programming language translates one line of code at a time and then executes it before moving to the next line?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!