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++;
Encapsulation of OOA Encapsulation separates the interface of an abstraction from its implementation. By taking the above example i.e. of a car, we can now categorize them as:
What are the necessary elements of an e-banking site? E-banking systems rely upon a number of common elements or processes. The given list comprises many of the potential elem
Explain why most interrupts are active low? This answers why most signals are active low when you see the transistor level of a module, active low implies that the capacitor in
What is strong-typing versus weak-typing? Which is preferred? Why? Strong type is checking the types of variables as early as possible, usually at compile time. Whereas weak ty
Q. Analysts in various functional areas? Today systems analyst's job presents a exciting and fascinating challenge. It provides high management visibility and opportunities for
Suppose that the working register W contains the value 0x4F, the register FSR contains the value 0x2B; the register with address 0x2B contains 0x2F and the instruction ADDWF INDF,
The desired daily output for an assembly line is 360 units. This assembly line will operate 450 minutes per day. The following table have information on this product's task times a
What are the techniques of Data Collection It can be either automatic or manual. Manual techniques can include: - Keypads/Keyboards to type in data - touch screens to s
In MS Access, the long and short date option does not show 4 digit years. How do I achieve the mm/dd/yyyy format? Ans) In the date field properties of the table, form, or prop
Design a 32:1 multiplexer using two 16:1 multiplexers and a 2:1 multiplexer Ans. Design a 32 X 1 MUX by using two 16 X 1 MUX and one 2 X 1. Now here total 32 input lines
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