I managed to fix my code.
I was actually decrementing the wrong thing in my while loop. I also changed from !isalpha( ) to !isalnum( ). My while loop should have been:
while(TRUE) {
...
Type: Posts; User: SirSig
I managed to fix my code.
I was actually decrementing the wrong thing in my while loop. I also changed from !isalpha( ) to !isalnum( ). My while loop should have been:
while(TRUE) {
...
I was told isalpha checks whether or not something is a letter. I actually forgot to put the not operator in front of the two isalpha functions, which I have in my code.
my while loop is actually...
Hello programmers,
My assignment is to create a function that checks whether or not the user inputted string is a palindrome.
I think I made a mistake in the palindrome function because it...
Ahhh, sorry I did not know the proper etiquette. I realized my problem as soon as I posted it so I did not want to take up any body's time.
My code was:
/*-------------
Include Section...
Edit:
I figured out my problem, it was that I am stupid. -_-
Please delete this thread.
Ohhh, I see why you use i rather than userinput.
I agree that it is inefficient, thats why the assignment cannot check higher values, but in class we have not learned arrays.
Thank you for all...
Hi, I'm working on a program which is supposed to identify prime numbers and output prime pairs (prime numbers which are 1 integer value away from each other).
My function for checking prime...
Thanks for your reply.
So if I define avg as a float does that fix it, and if its defined as a float do I still need the remainder?
I put colons there and they do not show up regardless.
...
I am supposed to write a code for my very first assignment where when the user enters four integers the program would perform several operations on it.
The problem I am having is that the product...