1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zloy xaker [14]
3 years ago
7

Write a program that takes two ints as input from the keyboard, representing the number of hits and the number of at bats for a

batter. Then calculate the batter’s hitting percentage and check if the hitting percentage is above .300. If it is, output that the player is eligible for the All Stars Game; otherwise, output that the player is not eligible. Maintain floating point precision when calculating the hitting percentage.
Computers and Technology
1 answer:
Lorico [155]3 years ago
8 0

Answer:

Hi!

<em>// First you have to initialize the variables.</em>

int hits = 0;

int atbats = 0;

float percentaje = 0;

function eligible() {

    hits = inputHits(); <em>//  Function that input the hits.</em>

    atbats = inputAtBats(); <em>//  Function that input the at bats.</em>

    percentaje = hits/atbats; <em>//  Now, you can calculate the percentaje.</em>

    if( percentaje > 0.300) { <em>//If percentaje if greater than .300 will print Eligible for the All Stars Game.</em>

         print('Eligible for the All Stars Game.');

          } else { <em>//Otherwise will print Not elegible.</em>

             print('Not elegible.');

         }

     }

}

Explanation:

You might be interested in
An argument does not always have to be made in words. A piece of music
mixas84 [53]

Answer:

B. emotional

Explanation:

An emotional argument. An argument does not always have to be made in words.

4 0
3 years ago
If a person is proactive, they do NOT have to be defensive.<br> True<br> False
Thepotemich [5.8K]
The answer is true for this question
6 0
3 years ago
Read 2 more answers
Read the statement and justify your answer. “ICT is important for every field.”
Alja [10]

Explanation:

ICT permeates all aspects of life, providing newer, better, and quicker ways for people to interact, network, seek help, gain access to information, and learn. Besides its presence everywhere, Information and Communication Technology has an immense economic significance.

4 0
3 years ago
Please tell fast plzzzzzz.​
lana [24]

Answer:

True

Explanation:

4 0
3 years ago
What is a benefit of the intranet?
olasank [31]
Hello there.

What is a benefit of the internet?

Access and share data info fast and safe.
8 0
4 years ago
Read 2 more answers
Other questions:
  • Pretrial services programs are also known as early intervention programs. <br> a. True <br> b. False
    15·1 answer
  • What do you do to add a line or circle to your presentation?
    7·2 answers
  • Which statement is true about customizing presentation programs? A. You can add multiple animations to an object in a slide with
    14·2 answers
  • Need help please. this effect my technology
    15·1 answer
  • Spam and i report
    14·2 answers
  • CHOOSE THE CORRECT CONTINUOUS TENSES( PRESENT CONTINUOUS,PAST CONTINUOUS AND FUTURE CONTINUOUS) : 1. I saw a snake while I _____
    10·1 answer
  • Carlie was asked to review a software project for her company to determine specific deadlines. Which part of project management
    9·2 answers
  • A drink costs 3 dollars. A pizza costs 6 dollars. Given the number of each, compute total cost and assign to totalCost. Ex: 2 dr
    13·1 answer
  • A printer is considered to be in the category of
    5·2 answers
  • Write a q basic program to find the sum of all the even numbers from 1 to 50​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!