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++;
Define the translator which perform macro expansion is known as a Macro pre-processor is the translator which perform macro expansion
What are the events by which we can program "help texts" and display "possible value lists"? -PROCESS ON HELP-REQUEST (POH). -PROCESS ON VALUE-REQUEST (POV).
Explain R-2R ladder D/A converter. Ans. R-2R ladder D/A converter: An R-2R ladder D/A converter is shown in Fig.(a). It uses resistors of only two values R and 2R. The inp
Q. Illustrate Layout of Magnetic Disk? Head is a relatively small device capable of reading from or writing to a part of platter rotating beneath it. This gives rise to organiz
The 2's complement of the number 1101110 is ? Ans. 1's complement of 1101110 is = 0010001 ans hence 2's complement of 1101110 is = 0010001 + 1 = 0010010.
Handling Interrupts: Precise interrupts (sequential semantics) Complete instructions before the offending instructions o Force trap instruction into IF o
Register-to-Register Architecture : In this organization, results and operands are accessed not directly from the main memory by the scalar or vector registers. The vectors which a
Purpose of storage: Several different forms of storage, based on different natural phenomena, have been invented. So far, no practical universal storage medium persists, and a
There are two goals to AI; the major one is to produce an artificial system that is about as good as or good than a human being at dealing with the actual world. The second goal is
Advantages of Encapsulation You can also delay the resolution of the details until after the design. You can keep your code modular.
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: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd