You're right but how do I reframe that point. I know that's where the problem is but reframing it has been my problem. Any suggestion how this could be done?
Type: Posts; User: ben2000
You're right but how do I reframe that point. I know that's where the problem is but reframing it has been my problem. Any suggestion how this could be done?
Please can someone assist me, this code is meant to evaluate a postfix expression, but it not working for negative digits. something like 2 -5 - i.e for 2-(-5)=7.
#include<stdio.h>...
Ok, it's my ignorance, I've fixed it.
That's what I'm actually trying to figure out, it's quite confusing to me right now.
Sorry all I though I thinking it will repeat the do loop while parsing the index 1,, to the get value function, cos I first did it with a 1*3 array before I tried to increase it to a 2*3 array.
...
Please I wrote this code to convert an expression to postfix, using the values of each row of an array. The expression can only be written using the words red, blue and green, which refer to col 1,...
Mats please can you give your code even at a price, I'm working on a project and I'm really short of time. Please, I've spent so much time on this whole code. I'm statistically inclined, due to the...
well I'm thinking of how to go about it but have not come up with something yet.
That's shocking, can you imagine 24yrs and I'm just one month into it. Well I hope to be like you someday, I envy you a lot. Like you know I've gotten into my infix-to-postfix-evaluate working, just...
Mats please work me through.
You mean you've written a code that did what I'm trying to do just now, then you must be too good. No doubt. I wish I'm in your position you're vast in this.
Well I used string there cos when and after extracting the values and concatenating them I'll probably need to store it in the string array.
Mats this is where I've gotten to. What step should I take next?
#include<stdio.h>
#include<stdlib.h>
#define MAXCOLS 80
int main()
{
I can use fgets but that will read in the entire expression at once, provideing a pointer to the string array
to read in the string but I don't know what funtion to use in reading it in
I missed out the ( ) around (array[a][red] + array[a][blue]*array[a])
But I don't know where to go from here to achieve what I want to do
This is what I've done but not what I wanted cos this is static I need to make it dynamic so users can input expression with any combination operators but this has to be done with infix to postfix...
Sure different operators *,+,-, / can be between the names which I call psuedo operands.
the column names are constant the user doesn't need to be modified by the user. Assuming red is the name of column one in the array, red should always refer to the elements in column one. The column...
I want to use variable instead of numbers as infix. Say I have red*blue+green as infix, where these are red, blue, green are variables names representing each array columns for n*3 array. Get the...
this is what I came up with so far but my but being that the array is double it's a bit difficult getting the elements into string expression and passing it to my infix.
#include<stdio.h>...
ok, I'm on it now
You are right, it's working properly now, but I still have a problem and that's the next stage in my code. You know I'm using numbers as direct infix input. I want to use variable instead of numbers...
Mats, I got it thanks for your time but try to be more lenient.
But the position++ is in the for-loop, I don't get you hear, are u saying I should remove the one after the if(c==' ') ?