Thanks for all the help. I corrected the braces and things look good now. I just keep getting an error message saying "illegal break". Am I using it improperly?
Type: Posts; User: ct26torr
Thanks for all the help. I corrected the braces and things look good now. I just keep getting an error message saying "illegal break". Am I using it improperly?
Don't know if this is a good spot to post this message but here goes. I am trying to take data a from a text box and add it to an array when you click the OK button on a form. I have created the...
I have this but it still seems to store the zero in the array
printf("\nPlease enter up to 8 numbers to stop entering numbers enter zero\n");
printf("\n");
for (i=0;i<8;i++)
...
I tried adding
theNums[i][j] = '\0';
I still can't get it to work
cool I will check out memset .... thanks for the help
How do I clear out the spot in the array? I don't know how to do that. Clearing the spot in the array seems like the easier way since I could just put it before the line that has break in it.
I have this code below that accepts up to 8 numbers and stores them in an array. I use a zero to stop taking numbers. I am trying to keep the zero from being stored in the array. Is there a way to...
I have made some changes. I have to use gets() for the first and last name. It is part of the assignment. I fixed the {}, I didn't realize I left them out because everything compiled okay. I have...
I have this code below. I am doing various things with it. I tried to comment it pretty good so you can see what is going on. I am having a problem with the array and calculating the sum. I am...
OK I have been playing around with this more and I have it working with the exception of capitalizing the letters. I have discovered the book we use for thsi class isn't that great. Is there a...
thanks for your posts. i have been doing good in this class but the whole book only has one chapter on strings.
Thanks guys. The code works pretty good now with just one exception. If the user doesn't fill up the array with 10 numbers I will get junk numbers in the empty spaces. Is there a way to have those...
Thanks to everyone for the help. This is what I have now. But it still doesn't seem to work properly when it sort and prints the sorted numbers in the array.
#include <stdio.h>
#include...
I have tried to do this. If I take the sorting part away this works properly. I can not get this to work at all.
I can not get this to work. Can someone please help me. I have been working on this for a week. I am trying to take up to 10 numbers from the user (if they enter a zero it stops taking numbers). ...
I have made some real big changes to this code but I am still having a problem in the sorting part of it. Please help.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include...
I can't figure it out. I have played with this for hours but just don't get it.
thes stdio.h added twice is an accident. I still can't get it to work. I have no idea why not.
I have been working on this code for awhile now. I wrote this function to sort but I don't know how to make it work. Can someone help me out.
#include <stdio.h>
#include <string.h>...
it doesnt print the numbers the user entered. I must have some bug in there but can't figure out what is it.
I made some more changes but still I am having a problem displaying the number enetered and sorted.
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include...
OK, I have the sum and average working. I am trying to display what the user entered for numbers and also sort them. Can someone let me know what I am doing wrong.
#include <stdio.h>...
I am trying to calculate the average of the numbers the user entered but I can't figure out how many numbers the user actually entered to so I can divide by the sum. The user can enter up to 10...
Here is what I am doing. I have posted this a few times over the last few days and you guys have been great with help but I am just getting so frustrated.
I am building an array that will take up...
thanks for the help. I will see if I can make it work.