The prime number is passed into this function. This works fine for 7 but when I enter 407 it tells me it is prime when it is not.
Here goes
char test_prime(int prime)
{
int r; ...
Type: Posts; User: cprogramnewbie
The prime number is passed into this function. This works fine for 7 but when I enter 407 it tells me it is prime when it is not.
Here goes
char test_prime(int prime)
{
int r; ...
ok I have a little code here. It doesnt work but I think I have the right I idea. It basically tells me that every # is not prime except for the # 1. Here goes nothing:
Its a function and the...
Hi guys,
I am pretty new to C and I need a little help. I am trying to write a program to determine a prime number for my class lab. I am a little confused to say the least and was wondering...