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++;
Describe a interface 'Human' with methods as walk' and 'speak'. Describe a class 'User' implementing 'Human'. Describe a work() method in User class.Add a class 'Person' also execu
Explanation The values of global variables can be used and changed all over the project within all scripts and libraries. However it is highly recommended to remain the number o
Explain the Power Dissipation characteristics for digital IC's. Ans. Power Dissipation: - It is amount of power dissipated in a digital IC. This is determined through
Extranets can be also used to connect an intranet to Internet so that remote offsite access can be made in a company's intranet by an authorized individual. This can facilitate thr
Drawbacks to having call centres overseas - Culture and language problems - Animosity to overseas call centres (resulting in loss of customers) - need for extensive r
What is an algorithm The solution to any problem that is stated by an exact number of well-defined procedural steps is known as an algorithm.
4-variable K-maps have 16 squares which arearranged in 4 columns and 4 rows. Columns and rows are labeled with 2 variables. The rows are arranged so that C or D ch
IA-64 instead depends on the compiler for this task. Even before the program is fed into the CPU, the compiler studies the code and makes the similar sorts of decisions that would
Home Banking: E-commerce is used in Home Banking as single call or single click. Online banking (Internet banking) is a term used for performing transactions, payments etc. ove
Perform 2's complement subtraction of (7) 10 - (11) 10 . Ans. 2's Complements Subtraction of (7) 10 - (11) 10 Firstly convert the decimal numbers 7 and 11 to there binary e
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