Announcement

Collapse
No announcement yet.

Need HELP!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • G Grant
    replied
    Code:
    DIM NAME$(14)
    FOR COUNT% = 1 TO 14
     READ NAME$(COUNT%)
    NEXT COUNT%
    Code:
    L% = 1
    S% = 1
    FOR COUNT% = 2 TO 14
     IF LEN(NAME$(COUNT%)) > LEN(NAME$(L%)) THEN L% = COUNT%
     IF LEN(NAME$(COUNT%)) < LEN(NAME$(S%)) THEN S% = COUNT%
    NEXT COUNT%
    Code:
    PRINT "The longest  name is ";NAME$(L%)
    PRINT "The shortest name is ";NAME$(S%)

    Code:
    DATA Chris Boss, Mike Doty, Lance Edmonds, Tom Hanlin
    DATA E B Knoppert, Mike Luther, Michael Mattias, Dave Navarro
    DATA Eric Pearson, Patrice Terrier, Scott Turchin, Greg Turgeon
    DATA Bob Zale, Egbert Zijlema
    (With these names, you're SURE to get an A)


    [This message has been edited by G Grant (edited April 22, 2000).]

    Leave a comment:


  • Karl Bellagio
    started a topic Need HELP!

    Need HELP!

    I need help on how to read data with a loop, and in the loop have
    a place, where I can get the longest piece of data(which are
    names),and shortest name, and print them outside of the data
    loop. Lets say there are 14 names. I am lost. What can I do?
    example:
    read n$
    if n$=blah then ok

    let A=LEN(N$)

    PRINT ," "n$,,A

    This is what I have so far. I just don't know what to do next.

    -------------
    Kro121
Working...
X