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
svet-max [94.6K]
3 years ago
11

Write a function numberofpennies() that returns the total number of pennies given a number of dollars and (optionally) a number

of pennies. ex: 5 dollars and 6 pennies returns 506.
Mathematics
1 answer:
ElenaW [278]3 years ago
5 0
What language are you writing this in? C? Javascript? Java? Are you allow to have parameters? 
The general idea should be the same. Since 1 dollar  = 100 pennies, we should write something like...

Java:
public static double numberofpennies(double dollars, double penny) {         
           double sum = 0;                  

           // The amount of pennies that dollar represents       
           double converted = dollars * 100.0;                  

           sum = converted + penny;
         
           return sum;   
}
Note: You should probably place this question under the category computer and technology instead of math. Also, this is just an example of what you could possibly write. What parameters you are allowed to use, what type (double? int? etc?) of pennies are you allowed to return, etc. depends on how you write it. 



You might be interested in
Solve the inequality:<br> 4x – 2 &lt; 6
spin [16.1K]

Answer:

The answer is:  x < 2

Step-by-step explanation:

8 0
3 years ago
Read 2 more answers
Which ratio is equivalent to 14/21<br><br><br> 2/7<br><br><br> 2/3<br><br><br> 1/7<br><br><br> 3/4
sergiy2304 [10]
The correct answer here is 2/3

That is because 7 doubled is 14 and 7 multiplied by 3 is 21.
6 0
3 years ago
17. Donald tried to solve the equation 4x - 11 = -2(6 -- 5x) + 7, but he
diamong [38]

Answer:

step 2

Step-by-step explanation:

instead of subtracting 7 to the oposite side they set it aside to then later on add it towards the end.

5 0
3 years ago
Which statement is true? 6 is 3 times as many as 2
Fudgin [204]

Statement A: 6 is 3 times as many as 2

2 x 3 = 6

Hope I helped ,please give brainliest!

5 0
4 years ago
Read 2 more answers
aya was at the library for 48 minutes until it close at 6.30p.m. what time did aya arrive at the library
ankoles [38]
Say arrives at the library at 5:42
3 0
3 years ago
Read 2 more answers
Other questions:
  • Estimate the temperature at which the rate of chirping is 130 per minute
    13·1 answer
  • David wants to buy a CD that regularly cost $12. The CD is Advertised as 1/4 off the regular price. Before tax, what is the cost
    8·2 answers
  • Leah is 2 less than 3 times Rachel's age. 3 years from now, Leah will be 7 more than twice Rachel's age. How old will Rachel be
    7·1 answer
  • What is the area of 1” by 3”
    11·2 answers
  • What benefit does a shielded twisted pair wires provide? A. reduces electric interference B. reduces insulation C. reduces flexi
    5·1 answer
  • My question is how to solve a solution set that are inequalities with two variables.
    14·1 answer
  • Help me out here plssss
    6·1 answer
  • What is the approximate area of a circle with a radius of 6 m?
    14·2 answers
  • PLZ HELP ME PLZ<br><br>PLZ<br><br>I WAN'T HELP <br>HELP PLZ <br>DUE AFTER 10 MIN
    13·1 answer
  • People in Spaceland live in 8 space stations, and travel between the stations in tubes.Every pair of stations is connected by tw
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!