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++;
Execution: Now instruction is ready for execution. A different opcode will need different sequence of steps for execution. Hence let's discuss a few illustrations of execution of s
diagrams of picket fence problem
Q. Explain Hardwired control organization? In the hardwired organization control unit is designed as a combinational circuit. The control unit is applied by gates, flip-flops,
Q. What is Memory Address Register? Memory Address Register (MAR): It specifies address of memory location from that data or instruction is to be accessed (read operation) or t
Use a timer interrupt to design a easy digital clock. This clock will count only minutes and seconds, and start at 00:00 every time your program starts. The show on the screen sh
Which template must you provide, in order to display data in a Repeater control? ItemTemplate.To display data in the ItemTemplate, declare one or more Web server controls and s
what is area subdivision and working
If the input to T-flipflop is 100 Hz signal, the final output of the three T-flipflops in cascade is ? Ans. The final output of the three T-flip-flops in cascade is 12.5 H
Game Playing techniques - artificial intelligence: Now we have dispensed with the essential background material for Artificial Intelligence problem solving techniques, and we m
what are the types of isoquants
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