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. Function of OSI Transport Layer? - It takes the information to be sent as well as breaks it into individual packets that are sent and reassembled into a complete message by
Explain why most interrupts are active low? This answers why most signals are active low when you see the transistor level of a module, active low implies that the capacitor in
Period and Space Tradeoffs - artificial intelligence: In practice, you are going to stop your agent for long term using in searching goal at some stage if it has not found a s
What are the basic functions of Database utility? The basic features of database utility are: Make database objects. Remove database objects. Adjust database obj
Q. Design a 3-bit counter using sequential logic with following counting sequence using JK- flip-flops which counts the sequence 0, 3, 2, 7, 5 and repeat.
Explain deadlock detection algorithm for single instance of each resource type. For single instance of each resource type the deadlock detection algorithm: (i) Maintain a wa
Super scalar architecture Pentium microprocessor is organized with three execution units. One executes floating-point instructions and other two (U-pipe and V-pipe) execute in
A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of t
Problem: (a) What shows a Pattern a Pattern? (b) Which pattern is given below? Justify your answer. public class A { private static A instance = null; private A() {
Unencoded micro-instructions One bit is required for each control signal; so number of bits needed in a micro-instruction is high. It represents a detailed hardware vi
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