+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Feb 2009
    Posts
    1

    Javascript programing....need help

     
    So I'm new to this whole programming thing. My teacher is horriable and I have been looking in the book. However, I'm still lost. We have to make a program that reads in values and finds the smallest number. I know how to do everything except for the reading in of the values. (we are to assume the first read is number of ints that wil be entered)

    can anyone help me?

  2. #2
    Caveat Emptor Rootstonian's Avatar
    Join Date
    Mar 2005
    Location
    Out of my mind
    Posts
    3,348
    Yeah, I've had my share of bad teachers, but you just have to set your mind to not letting them win.

    I'm a programmer, but don't know the syntax of Javascript (even though it is close to C/C++ which I know quite well).

    Write it in English (psuedo-code first).

    Read first number....so, first_number = 10; we have 10 numbers to find the smallest.
    Read next number....say it's 2635...store it in variable "smallest" (who knows, it could be!)
    Read next number (which would be the second one in the list of ten) store it as "new_number" Say it's 10,030,884,388=
    Is new_number less than smallest?
    Yes...then let smallest equal new_number.
    No...it's a bit bigger...go read the next number
    Continue till you have read all 10 numbers.
    After 10 numbers, "smallest" will hold the correct value

    This is prime fodder for a for/next or while loop.

  3. #3
    Member theGlitch's Avatar
    Join Date
    Jul 2008
    Location
    Boston, MA
    Posts
    185
    Blog Entries
    1
    read from file: How to read and write files in JavaScript

    read from text box:
    JavaScript Intro

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Looking for a collage to go to in CA. for programing
    By Yakri in forum Certification and Education
    Replies: 11
    Last Post: October 9th, 2007, 08:17 PM
  2. programing language help!
    By lancelotstrife in forum General Tech Discussion
    Replies: 7
    Last Post: November 20th, 2003, 10:39 AM
  3. programing software
    By nick.arnott in forum Webmastering and Programming
    Replies: 3
    Last Post: July 5th, 2003, 01:19 PM
  4. Programing with Linux
    By PcGamer in forum General Tech Discussion
    Replies: 6
    Last Post: October 22nd, 2002, 10:35 PM
  5. simple programing help
    By MDS in forum Webmastering and Programming
    Replies: 51
    Last Post: October 4th, 2002, 08:18 PM

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Recommended Sites: ResellerRatings Store Reviews