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++;
What are preprocessor directives? Preprocessor directives: These are the commands given to a program called as pre-processor that processes the source code before it passes by
Overlay Graph: It overlay the content of two graphs that shares an ordinary x-axis. Left Y-axis on the merged graph show's the present graph's value & Right Y-axis illustrate the v
Minimize the logic function F(A, B, C, D) = ∑ m(1,3,5,8,9,11,15) + d(2,13) using NAND gate with help of K-map. Ans. Realization of given expression by using NAND gates: In
The English existential construction involves so-called there-sentences such as these: (1) There is a dog in the yard (2) There were no children at the party (3) There
Creating Files for Writing Only Creating Files for Writing Only : To create a text file for writing only, pass "w" into fopen as the second argument. This example follows along
What is a Turing Machine? Turing machine is a simple mathematical model of a computer. TM has unlimited an unrestricted memory and is a much more accurate model of a general
Q. Explain Cache Organisation? Cache memories are found in nearly all latest computers. They are very helpful for increasing speed of access of information from memory. Let's
Explain the importance of computer architecture Studying the architecture implies working on machine language programs. However, this isn't practical when we design a computer
how to write algorithum for unix progam
What is data hazard in pipelining? What are the solutions? A data hazard is a situation in which the pipeline is stalled due to the data to be operated on are delayed for some
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