Adblock breaks this site

[help] Question For Homework Vb

Discussion in 'Programming General' started by ♫TaeYang♫, Sep 18, 2011.

  1. ♫TaeYang♫

    ♫TaeYang♫ Forum Addict
    Banned

    Joined:
    Jun 6, 2010
    Posts:
    501
    Referrals:
    0
    Sythe Gold:
    0
    [help] Question For Homework Vb

    "Write a program to request the name of a baseball team the number of games won and the number of games lost as a input and then display the percentage of games won

    can someone show me the answer or how to do this plz
     
  2. Terrankiller

    Terrankiller Ex-Administrator
    Retired Administrator Visual Basic Programmers

    Joined:
    May 7, 2005
    Posts:
    1,286
    Referrals:
    1
    Sythe Gold:
    1
    [help] Question For Homework Vb

    http://en.wikipedia.org/wiki/Percentage#Calculations

    Lets say the user has chosen the team "A" and inputs a total of 238 games won (w) and 262 games lost (l). Your goal is to calculate the 100 percentage quantity (p) of the games won.

    (w / (w + l)) * p

    (238 / (238 + 262)) * 100

    (238 / 500) * 100

    0.476 * 100

    47.6%
     
< Qbasic help | Starting C++ >


 
 
Adblock breaks this site