Name: Anonymous 2011-10-02 23:37
Would you guys be able to help me with this for my programming class? Yes it's simple, but I'm just learning BASIC. New programmer.
"Write a program that:
asks the user how many terms they wish to enter
asks the user to enter the numbers (store in an array)
displays the terms in order on a single line
displays the terms in reverse order on a single line
tells the user the sum of the numbers
tells the user the average of the numbers
(this may be a rounded integer - decimals are optional for this task)
tells the user the value of the largest number
tells the user the value of the smallest number
Additional Requirements:
include an AppTitle (that includes your name)
good use of clearly written comments
indent your code (in conditional statements, and for the loop)
good user interface - the program must clearly communicate to the user what it does and what input is required
global variables are permitted for this assignment"
Here's what I've got so far:
;Assignment: 3.3
;Name: Connor Morhart
;Date: Oct. 2
;Program Description:
;Set up the graphics window.
Graphics(640,480,0,2)
;Set backbuffer
SetBuffer(BackBuffer())
;Apptitle
AppTitle "Assign. 3.3 - Connor Morhart"
Dim Array1(100)
TermNum = Input("How many do you wish to input?")
For IntNum=1 To TermNum
Array1(IntNum) = Input("please type integer #" + IntNum + " " )
Next
For IntNum=1 To TermNum
Write (Array1(IntNum)) + ","
Next
WaitKey()
End
"Write a program that:
asks the user how many terms they wish to enter
asks the user to enter the numbers (store in an array)
displays the terms in order on a single line
displays the terms in reverse order on a single line
tells the user the sum of the numbers
tells the user the average of the numbers
(this may be a rounded integer - decimals are optional for this task)
tells the user the value of the largest number
tells the user the value of the smallest number
Additional Requirements:
include an AppTitle (that includes your name)
good use of clearly written comments
indent your code (in conditional statements, and for the loop)
good user interface - the program must clearly communicate to the user what it does and what input is required
global variables are permitted for this assignment"
Here's what I've got so far:
;Assignment: 3.3
;Name: Connor Morhart
;Date: Oct. 2
;Program Description:
;Set up the graphics window.
Graphics(640,480,0,2)
;Set backbuffer
SetBuffer(BackBuffer())
;Apptitle
AppTitle "Assign. 3.3 - Connor Morhart"
Dim Array1(100)
TermNum = Input("How many do you wish to input?")
For IntNum=1 To TermNum
Array1(IntNum) = Input("please type integer #" + IntNum + " " )
Next
For IntNum=1 To TermNum
Write (Array1(IntNum)) + ","
Next
WaitKey()
End