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++;
a ship is loaded with a stock of 3 items each unit of item n has a wt wn and vn the max cargo wt the ship can take is the details of 3items are item(n):1 2 3 wt(wn):2 3 1 value(vn)
Explain the characteristics of program interpretation model. The program interpretation model characteristics are: The source program is retained into the source form it
What are the Touch Panels In case of touch panels, displayed objects or screen positions is allowed to be selected with the touch of a finger. A typical application of touch pa
Parallelism Conditions As discussed earlier, parallel computing needs that the segments to be implemented in parallel must be free of each other. Thus, before implementing para
How is recursion handled internally? Internally, every recursive call to a function requires storing the intermediate values of the parameters and local variables in a run time
The Laser Computer Printer Company decides monthly what to produce during the subsequent month. They produce three types of printers, the Laser Rocket, the Alpha Laser, and the La
Q. Signed 1s complement representation? Another possibility that is also simple is use of signed 1's complement. Signed 1's complement has a principal. Add both numbers includi
Define Algebraic method for Simplification of the Boolean Expressions This method is depend on the by knowledge of the Boolean algebra. Expression can be making simpler by usin
how can we design a multiplier by using ASM chart and then design the data controller ?!!
The linkage section is used to pass data from one program to one more program or to pass data from a PROC to a program.
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