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 Multidimensional Arrays? Multidimensional array: Multidimensional arrays can be defined as "arrays of arrays". For example, a bidimensional array can be fictional as a
How different control function categories help in signalling and control. Events happening outside the exchange on the line units, trunk junctions and inter exchange signalin
I am the inventor of the railway signaling device now operated by timer. I wish to move on to the next phase where the equipment will be operated by DTMF codes. The device is a si
What are primary keys and foreign keys? Primary keys are the unique identifiers for every row. They must have unique values and cannot be null. Due to their significance in rel
Explain the differences between Paging and segmentation. Paging and segmentation P aging Segmentation Computer memory is separa
Explain Message switching. Recourse computer sends data to switching office that stores the data into buffer and seems for a free link. Sends link to other switching office, if
Encapsulation of OOA Encapsulation separates the interface of an abstraction from its implementation. By taking the above example i.e. of a car, we can now categorize them as:
E-commerce advance tremendous chance by permitting industrialist to buy Materials at a low price internationally. Also they give companies the opportunity to sell to universal stor
Explain Priority encoder with an example. Ans. Priority encoder- Basically an encoder is a combinational circuit which performs the inverse operation of a decoder. The inp
Define emulation. Given a computer with a particular instruction set, it is possible to explain additional machine instructions and execute them with extra micro routines. Emul
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