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++;
Draw the logic diagram of a full subtractor using half subtractors and explain its working with the help of a truth table Ans: Full Subtractor: It has to take care of repe
Write a BASH/C shell script which takes name of one or more files as a command line argument, and prints the following information for each file: owner, number of words in the file
Examples of declarations of external variables that are not definitions: extern char stack[10]; extern int stkptr; These declarations tell the compiler that the variab
Q. Show the Classification of Printers? Printers can be classified on following bases: a) Impact: Impact printers print by impact of hammers on ribbon (for example Dot-Matri
Von Neumann architecture was first majoranticipated structure for general-purpose computer. However before consideringmain components of von Neumann architecture let us first elabo
BIOS or Basic Input/Output System is the first program accessed by the processor during start up to make sure that all the other basic programs, hard drives, ports, peripherals and
The linkage section is part of a known as program that 'links' or maps to data items in the calling program are working storage. It is the part of the called program where these sh
Binary Resolution: However we saw unit resolution for a propositional inference rule in the previous lecture: (A? B, ¬B) /A Thus we can take this a little further to
Q. Illustrate Master-Slave Flip-Flop? Master slave flip-flop comprise two flip-flops. One is master flip-flop and other one is known as slave flip-flop. Fig below shows impleme
Three Logic Levels are used and they are High, Low, High impedance state. The high and low are normal logic levels & high impedance state is electrical open circuit conditions. Tri
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