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++;
In a for loop, if the condition is missing, then, It is supposed to be present and taken to be true.
Consider the following instance of the Students relation, sorted by gpa. sid name login age gpa 53831 Madayan madayan@music 11 1.8 53832 Guldu guldu@music 12 2.0 53688 Smith smith
Implication connective - Modus ponens rule: We notice that this is a trivial example, so it highlights how we use truth tables: as the first line is the only one when both abo
What is "Common Language Runtime" (CLR)? CLR is .NET equivalent of Java Virtual Machine (JVM). It is the runtime that changes a MSIL code into the host machine language code,
Yet another type of input is HIDDEN input. A HIDDEN input is a value/name pair which is returned to you but doesn
I²C TECHNOLOGIES The I2C protocol bus is two bi-directional wires, serial data (SDA) and serial clock (SCL), that transmit information between the devices connected to the bus.
Explain in detail about the Dynamic timing a. Design is simulated in full timing mode. b. Not all possibilities tested, as it is dependent on input test vectors. c. Simul
What is meant by scan code? When a key is pressed on the keyboard, the keyboard controller places a code take to the key pressed into a part of the memory known as the keyboar
Q. Illustrate logical Data Processing Instructions? AND, OR, NOT, XOR operate on binary data stored in registers. For illustration if two registers comprises data: R1 = 10
Your JDBC code may throw the following exception: "The coordinator has rolled back the transaction.No further JDBC access is permitted within this transaction." The WebLogic
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