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
____ [38]
3 years ago
7

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.
Sample program:
#include
using namespace std;

int main() {
cout << NumberOfPennies(5, 6) << endl; // Should print 506
cout << NumberOfPennies(4) << endl; // Should print 400
return 0;
Computers and Technology
1 answer:
Over [174]3 years ago
4 0

Answer:

Following are the code to the given question:

#include <iostream>//header file  

using namespace std;

int NumberOfPennies(int ND, int NP=0)//defining a method that accepts two parameters  

{

return (ND*100 +NP);//use return keyword that fist multiply by 100 then add the value  

}

int main() //main method

{

cout << NumberOfPennies(5,6) << endl; // Should print 506

cout << NumberOfPennies(4) << endl; // Should print 400

return 0;

}

Output:

506

400

Explanation:

In the method "NumberOfPennies" it accepts two parameters that are "ND and NP" that uses the return keyword that multiply 100 in ND variable and add in NP variable and return its values.

In the main method it it uses the cout method that call the by accepts value in parameter and print its value.

You might be interested in
What is a grant cycle?
Lina20 [59]

Answer:

The grant lifecycle refers to the entire process a grant goes through—from creating the opportunity through implementation and ending with the closeout.

Explanation:

... The grant lifecycle is comprised of three distinct phases: Pre-Award, Award, and Post Award. Hope that this helps you and have a great day :)

5 0
2 years ago
Read 2 more answers
Define the term editing​
Harrizon [31]

Answer:

editing is a word file mean making changes in the text contain is a file. or a word file is one of the most basic ms office word operation.

8 0
2 years ago
In 1993, a group of professors and students at the University of Illinois National Center for Supercomputing Applications (NCSA)
Vladimir [108]

Answer:

The answer is "False"

Explanation:

The given statement is false, which can be described as follows:

The Netscape browser is also known as the series of the name web browsers, This browser was developed by AOL's former holding company Netscape Communicative Networks Organization.

  • It was a corporation, that has been best remembered for its Navigator web browser.  
  • It is one of the two web browsers most successful in the 1990s, that's why the given statement is false.

7 0
3 years ago
You are trying to sell a new product to a store owner. Which method of presentation is likely the most effective?
Elina [12.6K]
D. Because if you show the owner the graph he'Il be impressed so he'll obviously want proof so show him the other store owners success quotes and then for him to trust you, Give him a trial of the product
5 0
3 years ago
Read 2 more answers
True / False Bit patterns have no intrinsic meaning.
scoray [572]

Answer:

The given statement is True

Explanation:

Since, a bit pattern is a bit sequence, basically, data which as such has no intrinsic meaning.

Bit pattern is  a bit sequence or sequentially arranged binary digits.

It is used to describe bit sequence in communication channels, memory or some other device.

Bit patterns are used to represent instructions, floating point numbers,  signed/unsigned integers.

7 0
3 years ago
Other questions:
  • Emma wants to create a web page for her school’s volleyball team. Which of these could she use?
    7·1 answer
  • Write a program that accepts any number of homework scores ranging in value from 0 through
    10·1 answer
  • Which is the most important reason you should properly cite information that you obtain from an Internet search? Question 2 opti
    8·1 answer
  • Do the pros of interpersonal communication via social media outweigh the cons? Explain.
    9·2 answers
  • Press the _______ key to move to the next cell in a row.
    12·2 answers
  • Which one of the following items is an example of software?
    12·2 answers
  • X = 19 y = 5 print (x % y)
    11·1 answer
  • Why bootable installer preparation is important? explain
    9·1 answer
  • 1.5 question 3 on edhesieve
    6·1 answer
  • You have a team member on a remote project who is not fluent in English and
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!