![]() |
|
#11
|
|||
|
|||
Re: How do I add arrays into my program?!?!Well the output I get is:
Code:
Code:
CPP / C++ / C Code:
For another you print the array "length" and an endl; what did you expect to see? Why aren't you using the array r[] and iterating the "number_of_resistors_connected" times? ...as far as the endl; goes you should dump that and print something like " Ohm, " or somesuch to go between each value. Last edited by Howard_L : 29-Oct-2009 at 00:47.
|
|||
|
#12
|
|||
|
|||
Re: How do I add arrays into my program?!?!thanks! should be r[i]....and what do you mean by "," instead of endl?
also most of the time when setting up an array the values are listed like this: 121 3434 how do i get it like this: 121, 3434 and how do i make my program realize i have input "blank" number of resistors for when it says Total series resistance is 2.123 kOhm for "3" resistors: 1000 kOhm, 1000 kOhm, 123 kOhm |
|
#13
|
|||
|
|||
Re: How do I add arrays into my program?!?!I think this will give you some ideas to start with.
Add stuff to customize to your liking and then incorporate it into your program: CPP / C++ / C Code:
|
|
#14
|
|||
|
|||
Re: How do I add arrays into my program?The program still wouldn't work the way you want it to.
THe formula for parallel resiatance should be: CPP / C++ / C Code:
CPP / C++ / C Code:
|
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Equation solver | RazoR | C Programming Language | 3 | 18-May-2008 10:24 |
| Need Help with input files. | Efferus | C++ Forum | 2 | 24-Nov-2007 17:19 |
| Two-Tier data dissemination code installation problem | nidhibansal1984 | Computer Software Forum - Linux | 6 | 16-Sep-2007 11:13 |
| program without arrays | dezstylz | C++ Forum | 3 | 31-May-2006 09:24 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The