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++;
An exchange uses a -40 V battery to drive subscriber lines. A resistance of 250 ohms is placed in series with the battery to protect it from short circuits. The subscribers are req
Find out the two inputs when the NAND gate output will be low. Ans. The output of NAND gate will be low if the two inputs are 11. The Truth Table of NAND gate is shown
Learning Weights in Perceptrons - Artificial neural network In detail we will look at the learning method for weights in multi-layer networks next chapter. The following descri
Consider the ReadRear Java method (a) Illustrate pictures that explain the data structure every time a checkpoint is reached for the problems of sizes one, two, three and four s
Echo suppressor is detrimental to full duplex operation because? This disables one of the two pairs in a four-wire trunk line while a signal is detected upon another pair.
Binary number system is most common for computer due to two stable states of its components. However unfortunately this isn't a very natural system for us as we deal with decimal n
We have not considered the time element in our decoding. An important time for decoding is the time from the address strobe (AS) to when the data is required in a read. Time
A program is backward compatible if it can use files from an older version of itself. For a file saved in the program to be backward compatible, it must be possible to open the fil
Explain the difference between a function declaration and function definition. Function declaration and Function definition: A function declaration having the name of th
What is an interface and what is an abstract class? Please, expand by examples of using both. Explain why? Abstract classes are closely related to interfaces. They are classe
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