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++;
In ISR there is no return value but in function call there is return value
What are advantages and disadvantages of TTL gates design with Wired-AND connection ? Ans. Advantages and disadvantages In this IC added logic is performed with
Optimum solution based on constraint problems: Whether depending on what solver you are using so there constraints are often expressed as relationships between variables as e.
managing devices and disks
find cos(x) and sin(x) an pseudocode (while loop
Q. Programming languages array operations? In programming languages array operations are written in compact form which frequently makes programs more understandable. Conside
What is write-through protocol? For a write operation using write-through protocol during write-hit: The cache location and the major memory location are updated concurrently.
Discuss in detail about the Computers and supercomputers Computers are classified with respect to their size, cost and speed as supercomputers, servers, embedded computers and
Q. Fundamental building block of main memory? The fundamental building block of main memory remains DRAM chip as it has for decades. Till recently there had been no important c
Q. How does the preparation of atoms in mainly solids differ from the arrangement of atoms in a liquid? Answer:- The arrangement of atoms in solids are diverse from those
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