Medical Factors Which make it The most effective just by Sejal Kakadiya Medicine and health agencies with now consentrate on top quality, charge together with great satisfaction health of their solutions. These are typically that support beams which a lot of these agencies redefine the direction they trade. The following really results in thrilled clients. How come Serious Treatment Direction Can be a Trend Inside Medicine and health Sector just by Steven Orange A whole lot of North american healthcare systems' options are generally about that direction together with procedure with serious circumstances. Direction with serious health conditions which include diabetes, excessive circulation demand, cardiovascular disease, together with hypothyroidism can be a vital component of easiest treatment healthcare provider's succeed. Inside standard product, that general practitioner spots someone on an automobile accident with treatment, inspects that condition ...
"A prime number is one, which is divisible only by 1 or itself."
To determine whether a number is prime or not, we have to divide the number successively by all numbers from 2 to one less than itself.
If remainder of any of these divisions is zero, the number is not a prime.
If no division yields a zero then the number is a prime number.
Program in C to Determine Whether a Number is Prime or Not
Steps:
- Declare integers num and i inside main()
- Prompt the message allow the input using printf() and scanf()
- Test whether a Number is prime or not using while() function.
Code:
#include <stdio.h>
int main()
{
int num, i;
printf("Enter a number");
scanf ("%d",&num);
i=2;
while (i<=num-1)
{
if (num%i==0)
{
printf("Not a prime number\n");
break;
}
i++;
}
if (i==num)
printf("Prime number\n");
return 0;
}
Related Posts:
- How to Create Simple JavaScript Fade Effect Animation?
- Image Slideshow with Navigation Buttons Using Javascript
- How to Create JavaScript Image Slideshow with Links
- Simple JavaScript Fade Effect Animation Using Jquery
- How to Create Simple JavaScript Fade Effect Animation?
- How to Create Pop Up Menus in Oracle Forms ?
- How to Create LOV in Oracle Forms Using Wizard ?
- How to Create Oracle Forms by Using Wizard ?
- How To Make Simple CSS Stylesheet for a Website ?
- How To Create Simple Menu Using CSS ?
- How to write a program in C using for Loop?
Comments
Post a Comment