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++;
draw 4 bit binary to gray code
Explain various steps for analysing an algorithm. The several steps involved in analysis of an algorithm are: 1. For any algorithm, the first step should be to show that it
Variable ordering - Forward checking: Hence this is different from variable ordering in two important ways as: Whether this is a dead end when we will end up visiting a
What are Assemblies? Assemblies are same to dll files. Both have the reusable pieces of code in the shape of classes/ functions. Dll needs to be registered but assemblies have
how can I draw er diagram for sell & storage section of a drugstore?
A sorted file having 16 items. Using binary search, the maximum number of comparisons to find for an item in this file is The maximum number of comparison is 4
Instruction Cycle The instruction cycle consists of a series of steps needed for the implementation of an instruction in a program. A typical instruction in a program is descri
Why disable statements are not allowed in functions? If disble statement is used in function,it invalids function and its return value. So disable statements aren't
What is virtual memory? Virtual memory is a method used in some large computer systems that allow the user to construct program as by a large memory space were available, equal
Yes, single thread module
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