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++;
Proof by Contradiction: Now for forward chaining and backward chaining both have drawbacks. But another approach is to think about proving theorems by contradiction. So we can
Explain in brief about Compact disks (CD) These are an optical storage media that have basically taken over from floppy disk. Software is now generally supplied on a CD (in for
When the user is inputting commands into your shell, it should identify the left, right , up and down arrow keys. To implement this, you will need to use the termios.h library to
1. A Bayesian network is shown for the variables paper Thickness, paper Alignment and Print Quality. The conditional probabilities are provided in the tables beside the nodes. Here
An object model for university system Establishing relationship among various classes in the system is the primary activity. Here, we have a simple model of a University System
Q. Illustrate Programming Based on Message Passing? Since we know programming model based on message passing employs high level programming languages such as C/C++ along with a
Assembler directives: An assembler directive is a statement to give direction to the assembler to perform the task of assembly process. Assembler directives control organizati
The Boolean expression A‾.B + A.B‾ + A.B is equivalent to ? Ans. The Boolean expression A‾ .B + A. B‾+ A.B is equivalent to A + B (A‾ .B + A. B‾+ A.B = B( A‾ + A) + A. B‾ =
Explain briefly any three of the commonly used code optimization techniques. 1. Common sub expression elimination: In given expression as "(a+b)-(a+b)/4", in such "common
explain parallel database system
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