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 objectives of USB? a) Simple b) Low cost c) Easy to use d) Supports wide range of data transfer characteristics e) Plug and play mode of operation
Assessing Heuristic Searches: Given a particular problem you want to build an agent to solve, so there may be more than one way of justifying it as a search problem, more than
Take the following recurrence relation consider only for n = 2k for integers k ≥ 1: T(2) = 9, and for n ≥ 4, T(n) = n + T(n /2). Three students were working together in a stu
State the scope of security policy The scope of security policy depends on aspects such as the size of the Intranet site, type of information hosted on it, and the number of u
What is NULL POINTER Inside main, a FILE * called file. Afterwards, the fopen function, passing it the path to data file, as well as "r", only intending to read from the file.
To calculate speed up performance various laws have been developed. These laws are discussed here. Amdahl's Law Remember, the speed up factor helps us in knowing the relat
If you open your computers case, the motherboard is the flat, rectangular piece of circuit board to which the whole thing seems to connect to for one reason or one another. It'
Process of Breadth first search: It's very useful to think of this search as the evolution of the given tree, and how each string of letters of word is found via the search in
What are the page headers for secondary lists? On secondary lists, the system does not show a standard page header and it does not trigger the event. TOP-OF-PAGE. To make page
Problem 1 Prove that :- x(x + y) = x by using identities 2 Write a short note on Analog to Digital Converter (ADC) 3 Differentiate between sequential and combinational ci
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