Search:

Type: Posts; User: qwertysingh

Search: Search took 0.00 seconds.

  1. For loop through a 2D array - just for select rows

    Hi,

    For my system I am using a 2D array called 'matrix', the dimensions of which are specified by the user (no more than 10 for both the Rows and Columns).

    The following for loop allows me to...
  2. Thankyou

    Thankyou
  3. Declaring the 'row' for my matrix - problems

    Hi,

    I must be doing something wrong; I am trying to get the user to input the 'row' index value for my 2D matirx array.


    printf("Enter the row value for the output: ");
    scanf("%d",...
  4. Replies
    0
    Views
    1,540

    Writing to my 2D Array

    Hi,

    Basically, I am having trouble writing to my 2D array.

    My system so far allows the user to input data in a 2D array called matrix. The user defines the size by specifying a row and column...
  5. Replies
    1
    Views
    913

    Use of a While Loop

    Hi guys,

    I need some help with a while loop in the context of my system

    ...


    int row = 0;
    int column =0;
  6. Replies
    4
    Views
    5,172

    Unsized array problem

    Hi, I just wanted to test my unsized array and populate it with user input. The test I wrote was simple and basic but it does not operate as I expected, it refers to a bus error.

    It may have...
  7. Replies
    3
    Views
    1,313

    Fixed

    Fixed, thankyou for your help
  8. Replies
    3
    Views
    1,313

    Writing to a 2D array

    Hi, I'm slightly stuck. I have got the user to input a value which is then stored at a hard coded index within the 2D array.

    eg,

    printf("Enter the 1st input value: ");
    scanf("%d",...
  9. Replies
    1
    Views
    3,236

    Help for my output array

    Hi Guys, I having trouble with my output array. The system works fine, in that it takes input from the user and runs the correct logic and then ouputs it.

    I have decided to include an output...
  10. Replies
    3
    Views
    1,421

    H,. thanks. Even though I am still quite new...

    H,. thanks.

    Even though I am still quite new to C (doing it all again), I can see where I can simplify the code further. For me to incororate a run function so that the user can input multiple...
  11. Replies
    3
    Views
    1,421

    Advice for my system

    Hi guys, thanks for your previous replies to my thread, I now have a system that satisfies my 1st iteration. It does what it is supposed to do, it allows the user to test individual logic gates,...
  12. Replies
    10
    Views
    1,533

    Brilliant, thats helped alot, but how can that be...

    Brilliant, thats helped alot, but how can that be inverted to produce the logic for the NAND? Or is it a different process altogether.
  13. Replies
    10
    Views
    1,533

    int result = !!array[0]; // Start off with the...

    int result = !!array[0]; // Start off with the first input.
    for(i = 1; i < n; i++)
    {
    result &= !!array[i];
    }


    With what you suggested the AND function works fine thankyou, but I have...
  14. Replies
    10
    Views
    1,533

    Hi, wel this is what I have now; #include...

    Hi, wel this is what I have now;


    #include <stdio.h>

    int and(int n)
    {
    printf("\nPlease Set The Values For Your Inputs: ");
    int array[n];
  15. Replies
    10
    Views
    1,533

    Hi, even when I take it out the loop it still...

    Hi, even when I take it out the loop it still doesn't seem to do what I want it to.

    if (array[i] == 0) {
    printf("output = 0");
    }
    else {
    printf("output = 1");
    }

    Am I right in...
  16. Replies
    10
    Views
    1,533

    Hi, thanks for the reply, thats great. I was just...

    Hi, thanks for the reply, thats great. I was just tweaking around with my code and included the if statement within the for loop before it.

    I wasn't quite clear before, sorry, but what I want is a...
  17. Replies
    10
    Views
    1,533

    Checking elements of an arrays

    Hi,

    I have a system that now specifies from the user a value to determine the size of an array. the user can then enter value into the array one by one, until they get to the limit specified, all...
  18. Replies
    5
    Views
    1,670

    Response

    Hey, thanks for the response. I'll test what you posted in my code hopefully tomorrow. Just a quick question, no I can't remeber if I heard this right or not; but if you use an array thats apart of ...
  19. Replies
    5
    Views
    1,670

    Reading and writing top arrays

    Hi Guys, I haven't used C for a while so I am abiot rusty, so I need to revert back to basics.

    I want to create a logic gate sim in C and run it throug the CMD prompt.

    The user will select the...
Results 1 to 19 of 19