Search:

Type: Posts; User: Lej1

Search: Search took 0.01 seconds.

  1. Can you explain a little more? Do you mean have a...

    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...
  2. I Cannot GET THIS TO WORK.. (Saving A STRING Into An Array...)

    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...
  3. Replies
    5
    Views
    1,505

    Ah! makes sense. So I've changed the function...

    Ah! makes sense. So I've changed the function type to void, but it's still not working.



    #include "stdafx.h"


    #define size 100
  4. Replies
    5
    Views
    1,505

    Nice!, so how do I "return" an array? Got...

    Nice!, so how do I "return" an array? Got everything else working.



    #include "stdafx.h"


    #define size 100
  5. Replies
    5
    Views
    1,505

    Arrays and functions? (easy question)

    #include "stdafx.h"


    #define size 100
    int countPrimes(int,int);

    int main()
    {

    /* Declaration of Variables */
  6. Replies
    17
    Views
    1,630

    Only "stores" the primes? .. So let's look at it...

    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...
  7. Replies
    17
    Views
    1,630

    Yes javaeyes.. the code I wrote is doing just...

    Yes javaeyes.. the code I wrote is doing just that. But they still have to be stored regardless..
  8. Replies
    17
    Views
    1,630

    The first suggestion works, however, how would I...

    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)
  9. Replies
    17
    Views
    1,630

    Very simple question

    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...
Results 1 to 9 of 9