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 are the steps comprised in authentication? Steps in Authentication: The control over the access of the resources within the repository is exercised in two steps tha
Design a BCD to excess 3 code converter using minimum number of NAND gates. Hint: use k map techniques. Ans. Firstly we make the truth table: BCD no
Layered Architecture of EDI: EDI is most commonly applied in the implementation and settlement phases of the trade cycle. In implementation of a simple trade exchange, the cust
What is pipelining? What are the various hazards encountered in pipelining? Explain in detail. The major characteristics of a pipeline are: a) Pipelining cannot be exe
How would you kill a process? The "kill" command takes the PID as one argument; this signifies which process to terminate. The PID of a process can be got using "ps" command
Q. Define the Arithmetic Micro-operations? These micro-operations execute simple arithmetic operations on numeric data stored in registers. The fundamental arithmetic micro-ope
Hill Climbing - Artificial Intelligence: As we've seen, in some problems, finding the search path from primary to goal state is the point of the exercise. In other problems, t
Explain the difference between depth first and breadth first traversing techniques of a graph. Depth-first search is dissimilar from Breadth-first search in the following way
Unification Algorithm: Here if notice for instance that to unify two sentences as we must find a substitution that makes the two sentences the same. Furthermore remember there
Inherent addressing Here the address is already built in to the instruction i.e. inherent to the code ABA ; Add A to B and store the answer in A Simple programs using
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