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++;
Why is the data bus in most microprocessors bidirectional while the address bus is unidirectional? Data Bus: These lines are used to send data to memory by output ports and
The features are needed to implement top down parsing are? Ans. Source string marker, Prediction making mechanism and also matching and backtracking mechanism features are need
Why are interrupt masks provided in any processor? Interrupt mask enable the higher priority devices comes first and there for lower priority devices comes last. The interrupt
Make a class library and describe class 'User'. In User class describe the public, protected and Friend functions. Make a console application andadd a reference to this library and
By using Rwatch, Awatch command in GDB we can set read or write watchpoint for a variable.
Q. Define a Formal System? A Formal System is one which is planned in advance and is used according to schedule. In this system procedures and policies are documented well in a
Q.What do you mean by Parallel virtual machine? PVM is essentially a simulation of a computer machine running parallel programs. It is a software package which allows a heterog
f(x)^2=f(x) - x
Hiding data within the class and making it available only by the methods. This method is used to protect your class against accidental changes to fields, which might leave the clas
Compare the use of switch statement with the use of nested if-else statement. If-else statement: When there are many conditional statements that may all evaluate to true, bu
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