3 Attachment(s)
I need Some help to complete this program
i write this program to call file from my hard drive "the file name is input.tex"
"the program, the file, and the result for the program are below"
please read the program and the file befor you read my question
now, i need to use 3 arrays
1) first array to read this part
include[0]: VAR ZRO 1
include[1]: +0000000000
include[2]: VAR I 1
include[3]: +0000000000
include[4]: VAR SUM 1
include[5]: +0000000000
include[6]: VAR AVG 1
include[7]: +0000000000
include[8]: VAR N 1
include[9]: +0000000000
include[10]: VAR TMP 1
include[11]: +0000000000
include[12]: VAR DTA 990
include[13]: +0000000000
in this way
VAR ZRO 1
VAR I 1
VAR SUM 1
VAR AVG 1
VAR N 1
VAR TMP 1
VAR DTA 990
2) second array is dimensional array to read this part
include[15]: READ N
include[16]: LABL 20
include[17]: READ TMP
include[18]: GE TMP ZRO 40
include[19]: SUB ZRO TMP TMP
include[20]: LABL 40
include[21]: PUTA TMP DTA I
include[22]: LOOP I N 20
include[23]: MOVE ZRO I
include[24]: LABL 50
include[25]: GETA DTA I TMP
include[26]: ADD TMP SUM SUM
include[27]: LOOP I N 50
include[28]: DIV SUM N AVG
include[29]: PRNT AVG
include[30]: STOP
in this way
READ N
LABL 20
READ TMP
GE TMP ZRO 40
SUB ZRO TMP TMP
LABL 40
PUTA TMP DTA I
LOOP I N 20
MOVE ZRO I
LABL 50
GETA DTA I TMP
ADD TMP SUM SUM
LOOP I N 50
DIV SUM N AVG
PRNT AVG
STOP
3) the third to read this part
include[32]: +0000000005
include[33]: +0000000020
include[34]: -0000000430
include[35]: +0000000553
include[36]: +0000001323
include[37]: -0000000896
in this way
+0000000005
+0000000020
-0000000430
+0000000553
+0000001323
-0000000896
i hope i see some help
Re: I need Some help to complete this program
Please ask specific questions and post relevant code in CODE tags - some here don't like links and compressed files. Exactly what is it you're stuck on? If you get error messages, post up the full message text and stack trace with the relevant code.
If you make it easy for us, we'll be happy to help. If you don't, it's much less likely we'll help. We won't write your code for you, but we can help you fix it.
See Questions.
Even if you're on the right track, you'll get run over if you just sit there...
Will Rogers
3 Attachment(s)
Re: I need Some help to complete this program
My Quastion is complete this code. there is no error
i need to use Array
i don't know where "CODE tags"
Re: I need Some help to complete this program
Quote:
Originally Posted by
fa6emh
My Quastion is complete this code.
I already told you, we won't write your code, and you need to ask specific questions.
Quote:
i need to use Array
OK, so what is stopping you? If you don't know how to use Java arrays, read a tutorial, we don't teach Java here.
Quote:
i don't know where "CODE tags"
Post your code inside [CODE]...[/CODE] tags - some people here don't like to download code from links.
If you won't spend the time to read the forum guidelines or the link I gave you about asking questions, do you really expect us to spend time trying to figure out your problem?
It always takes longer than you expect, even when you take into account Hofstadter's Law...
Hofstadter's Law