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++;
Q. Write an interrupt routine to handle 'division by zero'? This file can be loaded just like a COM file though makes itself permanently resident until the system is running.
Q. What is Ordered directive? This directive is used in combination with for and parallel for directives to cause an iteration to be executed in order that it would have been h
A full adder logic circuit will have ? Ans. The full adder logic circuit also accounts the carry i/p generated in the earlier stage and it will add two bits. Hence three inputs
A certain car has suspension modes which are uncoupled front to back. When a person with a mass of 60 kg sits in the rear of a car, in the centre of the seat which is directly ove
What are privileged instructions? Some of the machine instructions that might cause harm to a system are designated as privileged instructions. The hardware permits the privil
Q. Calculate Print Speed of printers? Speed at which a printer prints is generally an important issue. Though the printer has to take a certain time to print. Printing time ris
Gordon Grant, majority shareholder and Chief Executive Officer of Finance-IT Ltd, is determined to be one of the entrepreneurs making money out of the recession. He started the fir
The XOR gate. The exclusive OR or XOR gate is similar to a two input OR gate. The output of an XOR gate is logic 1 only when one input or the other input is high and is 0 when
Microsoft access has vast advantages for a programmer and end user. Some of the advantages are ? Relative compatibility with SQL and VBA. ? Microsoft SQL server desktop engi
Given the subsequent FIFO and rules, how deep does the FIFO require to be to stop underflow or overflow? RULES: a. frequency(clk_A) = frequency(clk_B) / 4 b. per
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