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 is meant by context switch? Switching the CPU to another process requires saving the state of the old process and loading the saved state for the new process. This task i
Q. What do you mean by Execution Unit? Execution unit performs all ALU operations. Execution unit of 8086 is of 16 bits. It also contains the control unit that instructs bus in
Ask questiPower and EnergyQuestion 4Consider a processor that runs at 2.5 GHz and 1 Volt. When running a given CPU-bound program,the processor consumes 100 W, of which 20 W is leak
Question: (a) (i) Explain what do you understand by Client/server architecture? (ii) List and briefly describe 3 types of Client/server architecture. (b) The most impo
Explain the advantages of computer Computer is one of the main components of an Information Technology network and getting increasing popularity. Nowadays, computer technology
Q. PVM communication model? A nonblocking receive as soon as returns with either data or a flag that data hasn't arrived while a blocking receive returns only when data is in r
Q. What is System Prompt? On loading (or Switching to) DOS, the screen displays C :\>, C>, A :\> or a similar message. The message displayed by DOS is called DOS Prompt or Sys
Q. What do you mean by Daisy chain? This scheme provides a hardware poll. With this scheme, an interrupt acknowledge line is chain by different interrupt devices. All I/O inter
aplications of inductomeric effect
Can you define a field without a data element? Yes. If you require specifying no data element and thus no domain for a field, you can enter data type and field length and a sh
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