Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Write a program to read in a positive integer and check whether it is prime or not?
/* Program to check whether a given number is prime or not*/]
# include
void main()
{
int i=2,n,flag=1;
clrscr();
printf("\nEnter the number : ");
scanf("%d",&n);
while(i { if(n%i==0) { flag=0; printf("\n%d is not a prime number",n); break; /*takes control out of the while as soon as the numbers is fully divisible */ } else i++; }
if(n%i==0)
flag=0;
printf("\n%d is not a prime number",n);
break; /*takes control out of the while as soon as the numbers is fully divisible */
}
else i++;
What is time slicing? With this technique each program runs for a short period known as a time slice, and then another program runs for its time slice and so on.
Everything stored on a computer can be represented as a string of bits. However, different types of data (for example, characters and numbers) may be represented by the same string
Decision Trees - Artificial intelligence: Suppose you just ever do four things at the weekend: go shopping, watch a film, play tennis or just stay inside. What you do depends
Fundamentals of IT 1. Explain the Impact of Information Technology on governments and educational organizations. 2. Explain application and system software. 3. Briefly ex
What is CLR? CLR is .NET equivalent of Java Virtual Machine (JVM). It is the runtime that changes a MSIL code into the host machine language code, which is then implemented a
Firewalls While getting one firewall for the company's Intranet it should be well known that firewalls come in both hardware and software forms, and that even though all firew
What are the blocks of microprocessor based system 1. The Memory and I/O System 2. The DOS Operating System 3. The Microprocessor
How to get the column count of a report? SY-LINSZ system variable gives the column count (line size) and SY-LINCT for line count.
Cross Bar The crossbar network is the easiest interconnection network. It has a two dimensional grid of switches. It is a non-blocking network and give connectivity among inp
What are disadvantages of the asynchronous reset and synchronous reset? Disadvantages of asynchronous reset: Make sure that the release of the reset can arise within one c
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd