Question about Computers & Internet

1 Answer

C++ write a c++ program to check whether a numberis prime or not?

Posted by on

Ad

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Novelist:

    An expert who has written 50 answers of more than 400 characters.

    Governor:

    An expert whose answer got voted for 20 times.

  • Expert
  • 142 Answers

#include<iostream.h>
#include<conio.h>
#include<process.h>
void main()
{
int num;
cout<<"\nEnter a number:";
cin>>num;
for(int i=2;i<num;i++)
if(num%2==0)
{
cout<<"\nThe number you have entered is not a prime number";
exit(0);
}
cout<<"\nThe number you have entered is a prime number";
return 0;
}






PLEASE DONT FORGET TO RATE
THANKS ANS REGARDS

Posted on Jun 09, 2008

  • Rohit Chadha
    Rohit Chadha Jun 09, 2008

    I think by mistake and typed two incorrect lines of code
    Please correct them and rest everything is the same:
    These are the correct ones. Sorry for the inconvenience


    for(int i=2;iif(num%i==0)


×

Ad

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of.(from cars to computers, handyman, and even drones)
click here to download the app (for users in the US for now) and get all the help you need.
Goodluck!

Posted on Jan 02, 2017

Ad

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

How can I cancel prime after my free trial


Hi Mary.
To end your Amazon Prime membership or cancel your free trial:
  1. Go to Manage Your Prime Membership.
  2. Depending on whether you have a paid Amazon Prime membership or are on a free trial, do one of the following: To cancel a paid membership, click End membership, which is the second option on the left-hand side of the page.

Amazon.co.uk Help: Cancel Your Amazon Prime Membership


How can cancel prime after my free trial Google Search

Nov 04, 2017 | Prime Computers & Internet

1 Answer

How do I join Amazon Prime?


Sign up for the Amazon Prime Free Trial Amazon Prime Free Trial members enjoy all the same delivery, video, and music benefits as paid members.
Amazon Prime Free Trial.
  • Turn Off Your Amazon Prime Membership Renewal.
  • We consider your free or paid membership history when determining whether you're eligible for an Amazon Prime free trial.
  • For more information, go to Amazon Prime Terms & Conditions.
  • Amazon Prime six-month trial memberships through Amazon Student offer a range of Amazon Prime benefits. Learn more about Amazon Student.

    Aug 15, 2017 | Amazon Computers & Internet

    1 Answer

    How many times do I have to ask?


    You must contact AMAZON customer service by phone is the easy way, but following the instructions below will work as well.
    How do you unsubscribe from Amazon Prime? To end your Amazon Prime membership or cancel your free trial:**Go to Manage Your Prime Membership.**Depending on whether you have a paid Amazon Prime membership or are on a free trial, do one of the following: To end a paid membership, click End membership, on the left-hand side of the page.

    Jan 21, 2017 | Amazon Computers & Internet

    1 Answer

    How do I cancel Amazon prime?


    To end your Amazon Prime membership or cancel your free trial:
    1. Go to Manage Your Prime Membership.
    2. Depending on whether you have a paid Amazon Prime membership or are on a free trial, do one of the following: To end a paid membership, click End membership, on the left-hand side of the page.

    Amazon.co.uk Help: Cancel Your Amazon Prime Membership

    https://www.amazon.co.uk/gp/help/customer/display.html?nodeId=200421650 How do cancel Amazon prime Google Search

    Dec 14, 2016 | Amazon Computers & Internet

    1 Answer

    If you have Amazon Prime do you have Kindle Unlimited? If not - how much is Kindle unlimited


    They are different programs. Prime has a loaner program for books. Check online for unlimited pricing.

    Nov 22, 2016 | Amazon Tablets & eReaders

    2 Answers

    What am I paying for Prime Membership and what dates am I covered to? Thanks, butterflycw@aol.com


    Hi
    You don't mention it so I have assumed that you are referring to "Amazon Prime". This is £79 per year.
    There is a free 30 day trial.
    I cannot log into your account, but can advise that your payments will be 12 months apart, so worth checking when first was made, or whether you are still within trial period.
    Cheers

    Jan 12, 2015 | Computers & Internet

    1 Answer

    PLEASE CALL ME MY NUMBERIS 9046737035THE KEYS ON IT JUST STOP WORKING


    Try to turn it off. If touch pad is inactive, then hold down power button until it shuts off. If it happens again after first or second boot I would advice to check/test Hard Drive and RAM

    Aug 19, 2011 | Sylvania G-Netbook

    2 Answers

    Pump Priming Problems.


    Oil suction filter may be clogged. Did you check it?

    May 21, 2008 | 1992 Mercedes-Benz 190

    Not finding what you are looking for?
    Computers & Internet Logo

    Related Topics:

    67 people viewed this question

    Ask a Question

    Usually answered in minutes!

    Top Computers & Internet Experts

    Doctor PC
    Doctor PC

    Level 3 Expert

    7733 Answers

    kakima

    Level 3 Expert

    102366 Answers

    David Payne
    David Payne

    Level 3 Expert

    14161 Answers

    Are you a Computer and Internet Expert? Answer questions, earn points and help others

    Answer questions

    Manuals & User Guides

    Loading...