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++;
Replacement and substitution: However, equivalences allow us to change one sentence with another without affecting the meaning, it means we know already that replacing one sid
Error-correcting code memory (ECC memory) is a type of computer data storage that can notice and correct the more general kinds of internal data corruption. ECC memory is used in m
Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4
Q. Explain the odd-even transposition algorithm? The algorithm needs one 'for loop' beginning from I=1 to N it implies that N times and for every value of I, one 'for loop' of
Consider the Hire Assistant problem. We interview n candidates and always hire the best qualified so far. Let n = 5 for our example. Find the probabilities that we hire exactly 1 t
Can a .NET web application consume Java web service? Yes Offcourse.Actually Webservices are independent to language. It depends on WSDL and SOAP. so any single can develope t
What is the Octant to hexadecimal conversion of 734 ? Ans. (734) 8 = (1 D C) 16 0001 ¦ 1101 ¦ 1100 1 D C
what can be different assignments given on this topic?
Program to calculate the value of the series 1+x+x2+x3+.... +xn. Read the values of ''x'' and ''n'' from the keyboard.
A given microprocessor has words of 1 byte. What is the smallest and largest integer that can be characterized in the following representations? a) unsigned b) sign- ma
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