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
podryga [215]
3 years ago
10

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:
Ludmilka [50]3 years ago
5 0

Answer:

#include <iostream>

using namespace std;

int main() {

int nhits,nbats;//declaring number of hits and number of bats..

cin>>nhits>>nbats;//promting nhits and nbats..

float perc=(float(nhits)/nbats)*100;//calculating percentage..

if(perc>300)//checking eligibility.

{

   cout<<"Eligible for ALL STARS GAME"<<endl;

}

else

cout<<"NOT Eligible"<<endl;

return 0;

}

Output:-

55

7

Eligible for ALL STARS GAME.

Explanation:

I have taken two integer variables nhits and nbats for number of hits and number of bats.Prompting them from the user.After that i am calculating the percentage and it needs to be a float variable.So I have done typecasting for the that converting 1 integer to float so that the answer will come in float.After that checking the eligibility and printing the message.

You might be interested in
If necessary, create a new project named Advanced19 Project, and save it in the Cpp8\Chap06 folder. Enter (or copy) the instruct
Digiron [165]

Answer:  If a customer orders more than four pizzas, the program should deduct 10% from the cost of the order. Modify the program appropriately, and then save, run, and test it.

4 0
3 years ago
Who designed the Analytical Engine in the 1830s? Alan Turing Alan Turing Charles Babbage Charles Babbage Bill Gates Bill Gates S
Dmitriy789 [7]
Charles Babbage Charles Babbage
7 0
2 years ago
A computer has a pipeline with four stages. each stage takes the same time to do its work, namely, 1 nsec. how many instructions
prisoha [69]

In figuring, a pipeline, otherwise called an information pipeline, is a lot of information preparing components associated in arrangement

Further explanation:

In figuring, a pipeline, otherwise called an information pipeline, is a lot of information preparing components associated in arrangement, where the yield of one component is the contribution of the following one. The components of a pipeline are frequently executed in parallel or in time-cut style.

Instruction travelling:

999,999,997 guidelines for each second. The pipeline has 3 nsec of straightforward figurings, at that point finishes a guidance in each ensuing nsec.  

3nsec (for first guidance to go down the pipeline).10^9 ns every second. 10^9 – 3 = 999999997 directions.

Instruction per second:

MIPS - Million guidelines for each second  

Million guidelines for each second (MIPS) is a more established, outdated proportion of a PC's speed and power, MIPS measures generally the quantity of machine directions that a PC can execute in one second.

Per second:

Million directions for each second (MIPS) is a more established, old proportion of a PC's speed and power, MIPS measures generally the quantity of machine guidelines that a PC can execute in one second. Be that as it may, various directions require pretty much time than others, and there is no standard strategy for estimating MIPS. Moreover, MIPS alludes just to the CPU speed, while genuine applications are commonly constrained by different elements, for example, I/O speed

Answer Details:

Subject: Computer and technology

Level: College.

Key Words:

Further explanation:

Per second:

Instruction per second:

Instruction travelling:

For further Evaluation:

brainly.com/question/6362387

brainly.com/question/12938965

6 0
3 years ago
Read 2 more answers
How to hack my neighboor wireless?​
guapka [62]

Answer:

 

How to Hack your Neighbor’s WiFi Password Using Tools

BY NEVIL PATELLEAVE A COMMENT

Getting a WiFi connection is a major concern once you are addicted to the web and mostly in the online world. When we hear the term hack, it strikes in our mind that it is the job of a high-end technology guy or a hacker. But to “hack WiFi password”, you don’t need to be a skilled technologist because even a non-technical guy can do it with some tricks and methods.

Most people have asked me the procedure to crack WiFi passwords, so today I am here with the solution and tricks for internet hack free WiFi from the major providers like AT&T, Comcast, and Xfinity.

 

wifi-password-hack

P.S. The WiFi password hacker tools are meant for fun/general purpose only and do not contain any functionality to attempt criminal acts. Therefore, you should be very cautious while operating them.

Wifi Hacker tools

(1) WiFi Hacker

WiFi Hacker is a simple and informal tool that makes hacking WiFi easy and safe without having required any technical knowledge. This software can crack WiFi passwords with some clicks and hack unlimited WiFi networks. WiFi Hacker gives you access to multiple offices or school wifi networks, including Comcast, AT&T, etc. which are equipped with tighter security. You can hack any locked password within minutes and anonymously because WiFi Hacker conceals your identity and personal information.

Explanation:

muwhahaha

7 0
3 years ago
What is the decimal value for the jump control?
Allushta [10]

Answer:

24

Explanation:

11000 is equivalent to 24 because if you look at a flippy do, the base is 2. so going from right-left, 2^0 is 1 for the first 0. second zero would be 2^1 which is 2. then the third zero is 4 (2^2). since they are zero’s, they are turned off, but the 1’s indicate that those bases are turned on. the first one going from right to left would then be 8 (2^3) and the last 1 going from right-left is 16 (2^4). so 16+8=24!

edit: didn’t mean to rate myself 1 star lol

4 0
2 years ago
Other questions:
  • Which of the following would an A/V technician NOT typically do? (Select all that apply).
    14·1 answer
  • Which of the following mountain ranges stretches from Alabama to Canada?
    10·1 answer
  • You have dinner with your family and tell them that you have taken bcis. your mother tells you that she is proud of you and that
    9·1 answer
  • Which director has shot a movie in HD? George Lucas, Michael Mann, Michael Moore, none of the above, all of the above
    14·1 answer
  • Which tab is used to configure editing restrictions in Word 2016? Review References Security Developer
    6·2 answers
  • Instructions:Select the correct answer from each drop-down menu. What type of font color should Kim select if she chooses a dark
    10·2 answers
  • ___MSDS provides information on how to handle, store, discard and care for potentially hazardous chemicals. true or false?​
    5·1 answer
  • What are the characteristics of a severe storm
    12·1 answer
  • Thank you very much for your email. ...... was very interesting​
    15·1 answer
  • Assuming dataFile is an ofstream object associated with a disk file named payroll.dat, which of the following statements would w
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!