Can you explain a little more? Do you mean have a multi-dimensional array? Could you please write a small example on it.. I'm new to C.
EDIT: Is it possible you'd like to join me on a TeamViewer...
Type: Posts; User: Lej1
Can you explain a little more? Do you mean have a multi-dimensional array? Could you please write a small example on it.. I'm new to C.
EDIT: Is it possible you'd like to join me on a TeamViewer...
All I want to do is ask the user to enter words, then I bubble sort them alphabetically, then print them back out. THE PROBLEM IS.. When I try to store "str" into the words array, idk what's...
Ah! makes sense. So I've changed the function type to void, but it's still not working.
#include "stdafx.h"
#define size 100
Nice!, so how do I "return" an array? Got everything else working.
#include "stdafx.h"
#define size 100
#include "stdafx.h"
#define size 100
int countPrimes(int,int);
int main()
{
/* Declaration of Variables */
Only "stores" the primes? .. So let's look at it like this. I am going to write a program to find all the primes up to 6. (1 will be considered prime.)
So, I make an empty array with how many...
Yes javaeyes.. the code I wrote is doing just that. But they still have to be stored regardless..
The first suggestion works, however, how would I not store it in the array? (with continuing the check)
Here's your first suggestion:
for(i = 0; i < size; i++)
{
if (arr[i]!=0)
I am trying to write a program that stores all the prime numbers up to 1000 in an array.. I can do that.. but when it's doing the check to see if it's prime, if it isn't, it just sets it to 0. So...