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 is glitch? What causes this (describe with waveform)? How to overcome this? The gated clock‘s corresponding timing diagram demonstrates that it implementation can lead to
Predicates in first-order logic sentences - artificial intelligence There are predicates first and foremost in first-order logic sentences. These are indications that some thin
Multiprogramming is a rapid switching of the CPU back and forth among processes.
A microprocessor uses RAM chips of 1024 × 1 capacity. (i) How many chips will be required and how many address lines will be connected to provide capacity of 1024 bytes. (ii) How
Q. Show the steps of execution of instructions? Fetch First Instruction into CPU: Step 1: Find/calculate the address of first instruction in memory. In this machine illust
What is the basic approach of page replacement? If no frame is free is available, find one that is not currently being used and free it. A frame can be freed by writing its co
What are the features of Client/Server Computing? Although there are several different configurations, different hardware and software platforms and even dissimilar network pro
Approach to reasoning - first-order logic: The formal approach to reasoning has bigger return and disadvantages. In generally we notice, if a computer program has proved somet
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
What are coupling and cohesion and why are they important concepts in software design?
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