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...
Type: Posts; User: qwertysingh
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...
Thankyou
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",...
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...
Hi guys,
I need some help with a while loop in the context of my system
...
int row = 0;
int column =0;
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...
Fixed, thankyou for your help
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",...
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...
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...
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,...
Brilliant, thats helped alot, but how can that be inverted to produce the logic for the NAND? Or is it a different process altogether.
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...
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];
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...
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...
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...
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 ...
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...