counting positive and negative numbers

Discussion in 'C++' started by jeanlouis.magannig, Aug 9, 2010.

  1. jeanlouis.magannig

    jeanlouis.magannig New Member

    Joined:
    Aug 9, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Write a program that reads an unspecified number
    of integers, determines how many positive and negative value have been read, and computes the
    total and average of the input values, not counting zeros. Your program ends with the input 0.
    Display the average as floating-point number. (For example, if you entered 1,2, and 0 , the
    average should be 1.5
     
  2. jeanlouis.magannig

    jeanlouis.magannig New Member

    Joined:
    Aug 9, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Write a program that displays the following two tables
    side-by-side (note that 1 kilogram is 2.2 pounds)
    Kilograms pounds Pounds Kilograms
    1 2.2 20 9.09
    3 6.6 25 11.36

    197 433.4 510 231.82
    199 437.8 515 234.09
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice