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++;
Problem 1 a) What is the purpose of the CPU and what can the CPU perform. b) Name the two most common types of software and briefly illustrate each one. c) The CPU con
Selective set The selective-set operation sets to 1 bits in register A where there can corresponding 1's in register B. It does not affect bit positions which have
How many address bits are required to represent a 32 K memory ? Ans. 32K = 25 x 210 = 215, Hence 15 address bits are needed; Only 16 bits can address this.
The voltage waveforms shown in given fig. are applied at the inputs of 2-input AND and OR gates. Determine the output waveforms. Ans. The Output waveforms for AND and O
Single Instruction and Multiple Data stream (SIMD) In this organisation, multiple processing elements are working under the control of a one control unit. It has multiple data
What are the Structural Notations These notations comprise static elements of a model. They are considered as nouns of UML model that could be conceptual or physical. Their ele
Which technique is an encryption technique? Ans. Block cipher technique and also Steam cipher technique is an encryption technique.
Busy hour traffic is the (A) maximum average simultaneous traffic. (B) traffic during peak hour. (C) traffic when all subscribers are engaged. (D) the durat
What is the difference among object oriented and structured oriented programming? Ans) ? Object Oriented means programme will be there in terms of Class and Object connection w
What is a Map? A Map is an Array, which having the addresses of the free space in the swap device that are allocatable resources, and the number of the resource units available
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