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++;
Q. What do you mean by PROC Directive? PROC Directive: Code segment comprises executable code for a program that includes one or more procedures defined initially with PROC dir
What is control word? A control word is a word whose individual bits show the various control signals.
What is meant by context switch? Switching the CPU to another process requires saving the state of the old process and loading the saved state for the new process. This task i
explain classification of computers in detail.also explain various application areas of computers
What is parsing? The target of parsing is to find out the syntactic validity of a source string. A tree is built for use through subsequent phase of compiler, if the string is
what is dbms goal?
Sript-Fu is the first GIMP scripting extension. Extensions are split processes that communicate with the GIMP in the similar way that plug-ins do. The distinction is that extension
How blocking and non blocking statements get executed? Execution of blocking assignments can be viewed just like a one-step process: 1. Evaluate RHS (right-hand side equatio
Q. Instruction set for IA - 64 architecture? Instruction set: Architecture gives instructions for multimedia operations as well as floating point operations. Itanium supports
what is computer
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