how do i program this?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DarkMather
    New Member
    • Dec 2006
    • 1

    #1

    how do i program this?

    I need a program that:

    Ask the user how much data they have
    For every number entered print the number and whether it was larger or smaller, and by how much, than the previous number.
    Compare the first number to 0.

    example: if i enter the numbers:

    45
    62
    23
    39
    97
    68
    70

    the output should look something like:
    45 45 larger
    62 17 larger
    23 39 smaller
    39 16 larger
    97 58 larger
    68 29 smaller
    70 2 larger

    Thanks

    p.s. its for my class and my teacher has like no clue what she is doing and this is a project, i hope you guys can help me.
  • Ganon11
    Recognized Expert Specialist
    • Oct 2006
    • 3651

    #2
    What ideas do you have, and what code have you got so far?

    Comment

    Working...