C Program to find sum of two numbers
printf("Enter the number:");
printf("%d is not a prime number",number);
printf("%d is a prime number",number);
The above program will print that whether the given number is prime or not. The program takes an integer value from user and assigns that value in the variable 'number'. While loop will be executed till the number does not become less than 1.In the loop we will check that the number is properly divisible by the numbers less than that number or not. If that number is not properly divisible by the any number less then that number then we can say that number is 'prime' and if the number is properly divisible by any single number less then that number then the number is not prime. We can understand this process with the help of given example:
So finally p=1,So 5 is a prime number.