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++;
The chief reason why digital computers use complemented subtraction is that it ? Ans. By using complemented subtraction method negative numbers can easily be subtracted.
How do you control instructions like branch, cause problems in a pipelined processor? Pipelined processor gives the best throughput for sequenced line instruction. In branch in
Q Develop a menu driven program to perform Binary addition and subtraction on two numbers that are inputted. Check that entered numbers are in base 2 or not else error messag
What is an I/O Interface? Input-output interface provides a method for transferring binary information among internal storage, like memory and CPU registers, and external I/O d
What are the desirable features of an Electronic Market Place? Features of an Electronic Market Place: 1. Its electronic and business center is not a physical building qu
Processor-Memory Interconnection Network (PMIN): It's a switch which attaches several processors to distinct memory modules. Connecting each processor to every memory module in
Q. Mention different classes of computer networks (on the basis of scale) and distinguish one from the other. Ans: Local Area Network (LAN) Metropolitan Area Netw
Q. Describe about general-purpose registers? The general-purpose registers as the name proposes can be used for several functions. For illustration they may comprise operands o
What is Anonymous File Transfer Protocol? Anonymous FTP: While a FTP client contacts a server, in that case, the daemon will ask for an account number or username and it
draw input and output charectoristics of BJT and justify CE configuration provides large current amplification
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