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. Subsequent statements set every element of matrix? Let a= [2,4,6,8,10], b=[1,3,5,7,9], c=[0,0,0,0,0] Consider the subsequent program section FORALL (i = 2:4) a(i)
A ppropriate Problems for Decision Tree Learning - Artificial intelligence It is a expert job in AI to select accurately the right learning representation for a particular lea
The logic 0 level of a CMOS logic device is approximately ? Ans. The low level is 0 volts approx in CMOS logic device.
Q. Explain about FAT - Inode? Today modern PC comprises total capacity of nearly 40GB for storage of program and data Due to this huge capacity in place of having just one oper
How and when race conditions happen in process control? How can it be avoided? b. Differentiate among following functions giving related syntax: (i) fork and vfork (ii) w
A v o iding Over fitting - Artificial intelligence As we discussed in the last lecture, over fitting is a normal problem in machine learning. Decision trees suffe
Explain difference between macro call and macro expansion. Macro expansion: While a macro name is used along with a set of actual parameters this is replaced through a code g
Define the Programmable logic devices (PLD)? In the world of digital electronic systems there are three essential kinds of devices 1.memory, 2.microprocessors, and 3.logic. The
What are advantages and benefits to businesses by e-commerce over extranets? The advantages and benefits to businesses comprise: Less Paperwork: along with documents and bus
Now we will learn how to compile and run PVM programs. To compile the program change to directory pvm/lib/archname where archname is architecture name of your computer. Then the su
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