Hi, I’m trying to make a program in c that tells a user if theirinput is a prime number.
So far I have a code but I made a mistake somewhere, the programdoes have to follow the format I have it in though.
the code is below:
// Program that will determine if a user’s number is prime
#include <stdio.h> // printf
int main()
{
int input = 0; // this is the user’s number
int div = 1 ; // this is our divisor during prime test
printf( “Give me a positive integer, and I’ll tell you if it’sprime! n”);
scanf( “%i”, &input ); // store user’s value in
PayPal Gateway not configured
PayPal Gateway not configured