Question about Computer Processors

1 Answer

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

Posted by on

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)


×

Add Your Answer

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

Related Questions:

1 Answer

When i switch my computer on i get invalid format.how do i correct.


boot your computer up, as it begins the boot up process hit the f2 and delete buttons to enter bios.
In bios select the "set bios defaults" ...you may have the option of optimal or failsafe defaults.....select the latter if the option is available . Then save settings and exit.
The computer will restart .
If it tells you that you have an invalid format again check that the fard disk is listed in the list of devices presented on the screen during the start up process.

If it is displayed it may be that you have a hdd issue , either the disk may have developed a fault or the software installation may have become corrupted.
The short method of finding out is to download a diagnostic for your hard disk from your disk's manufacturer's website to diagnose whether it is in useable condition.
The program will give you the results after which you can decide,
if it is bad, to replace it or, if it is ok, whether to reinstall windows or attempt to repair the current installation, If you have no umportant data on the machine a full wipe with the software that you downloaded is advisable. Then install your updates and apps etc.


GOOD LUCK.....it could take a couple of days to sort the whole thing out

Jun 28, 2015 | Intel Computer Processors

1 Answer

Amd athlon 64. Why does the ethernet port have a solid orange light?


you need to include details of the motherboard make and model. It may just be to indicate that it is enabled and functional. To check whether this is an error signal go into device manager and check under network adaptors whether this is working correctly

Jun 04, 2015 | AMD Computer Processors

1 Answer

Kocaso nb1016a


The first thing that comes to mind is that either the charger or the battery is faulty. You can check whether the battery is retaining its charge properly or if it drains out quickly.

The Kocaso NB1016 specification states that it uses ...
"Power Device Type:AC, DC can DC can car charger". So you can test whether it can be charged from a car battery. If so, then your charger is at fault. If all else fails you'll have to contact Kocaso support for a software/firmware upgrade.

Feb 14, 2014 | Computer Processors

1 Answer

How to unlock set


Hi whether you want to unlock your Samsung Galaxy pocket handset from network lock .Then have a look at Mobile-Unlocker.com here they render unlock code for all mobile models .You first check whether the code is available for your country and network provider to which your mobile is locked at present .If yes then pay for it and unlock your mobile.

Jun 06, 2013 | Samsung Galaxy Pocket

1 Answer

Lights but no boot


Are you using a desktop or laptop. Is OS already installed on the system?
Start your computer and press F2 key while booting and before the logo appears.
Check for the boot menu, and see whether your first boot device is your hard disk of the system or not.
If not then do that and in case of desktop if you have more than two hard drive just check whether the first boot device is your that hard drive on which the OS is installed or not.
I guess, it will resolve the problem. For further assistance, you can avail our technical support by visiting our website: http://www.vtechsquad.com.

Apr 29, 2013 | Dell Precision 380 Pentium D 3.2GHz 8GB...

1 Answer

Windows hang


Test all power and data leads that attach to your hard drive IDE,SATA

the leads from your (motherboard to your hard drive) make sure they have secure dust free connections and are not faulty or just replace them they might be faulty


if its a 40 pin flat ribbon type it will be the first to fail


make sure all leads that are attached to your drives dvd\cd 3 1/2 inch floppy have secure connections and are not faulty


even something as small as a faulty electrical fan and its lead can cause you problems

computers need all power and data to continue through every working device and to have an end so any faulty leads will end up with a computer error


make sure your graphics card is securely seated with no dust built up or in the socket

if you remove your graphics check the socket to make sure its dust free


restart your computer then reinstall it this should activate found new hardware wizard


if you are able to get a screen

scroll to the bottom toolbar bottom of screen right click you can select task manager applications also processes you will see whats running on your computer and ticking over you might have a virus


if you see something running that you does not need to be running select end now then you might you might uninstall that particular program


and some unnecessary programs


you should also check leads from motherboard to hard drive for secure dust free connections


click start control panel administrative tools computer management disk management right click on your drive select properties click tools you should see click check now


click start tick in both boxes this will schedule to on restart

do not have any input while chkdsk utility is in progress any might damage your computer


also you might download and use this registry cleaner it is totally free to use

http://download.cnet.com/ccleaner/


then defragment your hard drive


adding more ram is the best way of speeding up a computer

If you're not sure if a module is right for your system use the


Crucial Memory Advisor tool for a list of guaranteed compatible modules


you should always ask for a guarantee on compatibility before purchasing any ram and buy working pairs if possible

you might have to many programs running at the same time putting to much strain on the CPU


try uninstalling a few unnecessary programs


This tool deletes unnecessary or temporary files on your hard disk so you can increase the amount of storage space you have.


Delete the files using Disk Cleanup

If you want to reduce the number of unnecessary files on your hard disk to free up disk space and help your computer run faster, use Disk Cleanup. It removes temporary files, empties the Recycle Bin, and removes a variety of system files and other items that you no longer need.





Open Disk Cleanup by clicking the Start button, clicking All Programs, clicking Accessories, clicking System Tools, and then clicking Disk Cleanup.


In the Disk Cleanup Options dialog box, choose whether you want to clean up your own files only or all of the files on the computer.


If you are prompted for an administrator password or confirmation, type the password or provide confirmation.


If the Disk Cleanup: Drive Selection dialog box appears, select the hard disk drive that you want to clean up, and then click OK.


Click the Disk Cleanup tab, and then select the check boxes for the files you want to delete.

When you finish selecting the files you want to delete, click OK, and then click Delete files to confirm the operation. Disk Cleanup proceeds to remove all unnecessary files from your computer.

This tool deletes unnecessary or temporary files on your hard disk so you can increase the amount of storage space you have.


Delete the files using Disk Cleanup

If you want to reduce the number of unnecessary files on your hard disk to free up disk space and help your computer run faster, use Disk Cleanup. It removes temporary files, empties the Recycle Bin, and removes a variety of system files and other items that you no longer need.


Watch the demo (1:00)



Open Disk Cleanup by clicking the Start button, clicking All Programs, clicking Accessories, clicking System Tools, and then clicking Disk Cleanup.


In the Disk Cleanup Options dialog box, choose whether you want to clean up your own files only or all of the files on the computer.


If you are prompted for an administrator password or confirmation, type the password or provide confirmation.


If the Disk Cleanup: Drive Selection dialog box appears, select the hard disk drive that you want to clean up, and then click OK.


Click the Disk Cleanup tab, and then select the check boxes for the files you want to delete.

When you finish selecting the files you want to delete, click OK, and then click Delete files to confirm the operation. Disk Cleanup proceeds to remove all unnecessary files from your computer.



this should speed up your computer


hope this helps


You can also run a free registry scan using utilities from http://re7.info

Aug 04, 2012 | Gigabyte GA-H77M-D3H New

1 Answer

Computer will not start untill several times of turning on .


yes check whether ur ram or part loose or not......tif yes then plz tight it......& if it doesnt works ......try to check cpu current wire........or change...

Mar 08, 2009 | AMD Athlon XP-2500 1.833GHz 512K 333MHz...

1 Answer

CPU running temp


Generally you will see core temps around 50C with a stock fan and no overclocking, that is if you run fully loaded 100% cpu usage. But this is all highly dependent on what type of cooling you have. A program like GIMPS Prime 95 will test your processor. The max temp for most of the Pentium 4 series is 85C, but to know all the details we need to know which core you have. Wikipedia would help you determine which core you have, or you can download a program that will tell you.
http://en.wikipedia.org/wiki/Pentium_4

Dec 14, 2008 | Intel (P42000400512SK478) Pentium 4, 2 GHz...

1 Answer

Can't retrieve files after backup is done. Error message


Typically if you have a hard drive, you can slave it to a working computer and manually go in and copy the files onto the working computer and mess with them there.

Whatever program created the backup files is the one you need to open them, but copying them should not be a problem unless they are protected via password or encryption.

I googled the file extentions and the .RIM didnt have anything relevent, this is probably because its some file extention thats only used by a particular device just lik 3g files for phones. You would need the device or program that created it to access it.

.isb files seem to be audio files of some type.

,

Dec 03, 2008 | Computer Processors

1 Answer

SOUND,AUDIO


You didn't recover your CD burning program adequately. Oddlly enough, you don't need drivers for the CD/DVD drives. They aren't even recognized unless you have a non-microsoft burning program. Those programs are worth updating. Find out what burning software you have-- I recommend downloading Belarc Advisor, a free program which not only tells you everything in your computer, with model numbers for hardware and all of your software (with their unique codes), but will also inform you if you are missing any needed Windows updates. Once you know what you have, if it came with the computer, you have to seek an upload at the computer manufacturer's website, as it may be a special program not related to the burning software purchased from the software manufacturer---go to their website for upgrades. Check device manager in control panel under hardware to see if you have a problem with anything (a big yellow check).
Then go to your audio manager on control panel, and set it up for whatever speaker configuration you have. I have realtec audio manager. This step is a must for configuring—you choose whether your laptop will use its own speaks or use your external speakers—you have to turn off the internal speakers and turn on the external.. you might find that your internal speakers are switched off.

Mar 04, 2008 | Medion (40010998)

Not finding what you are looking for?
Computer Processors Logo

Related Topics:

66 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computer Processors Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

joecoolvette
joecoolvette

Level 3 Expert

5660 Answers

Matthew Spark
Matthew Spark

Level 3 Expert

1042 Answers

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

Answer questions

Manuals & User Guides

Loading...