![]() |
|
#1
|
|||
|
|||
Need help on a project for C programmingHi everyone!
I need some help on a project I have. The project details are on this page: www.enee.umd.edu. A summary of what I have to do is that I have to make a program that uses parentheses to show the order of operations. I can use arrays and basic functions without pointers. Also, I can use switch statements, if and else statements, and loops. I can't use anything else cuz I haven't learned it yet and also I am not allowed to use anything that I have not learned yet. So far I have: - A function that tells the precedence of the expression (returns 2 for mult., div., modular, returns 1 for +, -, and returns 0 for anything else). - A function that returns the length of the expression. - A main function that searches for negative values and puts parentheses around them. - An array of characters for the expression and an array of integers for the precedence (both arrays are updated as parentheses are added to the arrays). This is where I am stuck. I am supposed to ignore anything between parentheses by considering them as a single operand. I made it so that anything between the parentheses has a precedence of 0, but can't figure out a way to put in the parentheses properly. Any help would be great! Thx! |
|
#2
|
||||
|
||||
|
Hi andrew and welcome to GIDForums™.
Most people around here don't have a problem looking at code and finding problems, but most of the times we just don't write solutions to someones questions. ![]() You said you have some code written, you should probably post that and try to be specific about where you are struggling. Also, if you post code, please do it properly between code tags ([c] & [/c]) Thanks! __________________
The best damn Sports Blog period. |
Recent GIDBlog
Writing a book by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Tutorial] GUI programming with FLTK | dsmith | FLTK Forum | 10 | 03-Oct-2005 15:41 |
| GUI programming | crystalattice | C++ Forum | 5 | 14-Sep-2004 12:17 |
| Beginning C Programming | ToyMachine22122 | C Programming Language | 7 | 30-May-2004 10:07 |
| Help with project. | anignna | C Programming Language | 12 | 27-Apr-2004 07:51 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The