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
This is a python program.
denpristay [2]

Answer:

word = input("Type your name: ")

print(len(word))

Explanation:

The len function will count all the chars in the string.

7 0
3 years ago
Is a NAS just a collection of hard drives or a computer
skelet666 [1.2K]

Answer:

NAS systems are networked appliances that contain one or more storage drives, often arranged into logical, redundant storage containers or RAID.

8 0
3 years ago
Which scenario would benefit most from being set up as a recurring appointment?
sveta [45]
The answer is b. Susan has an appointment with he co-worker on the first Monday of every month. This scenario would benefit from being set up as a recurring appointment, since it requires the same thing to be done every month on the same day. Susan is likely to forget this appointment every month, so a reminder like this would be useful for her. For the other cases, a recurring appointment would not be of much benefit since they do not follow a particular pattern time-wise.
3 0
3 years ago
A ____ resembles a circle of computers that communicate with each other.
Sidana [21]

Answer:

ring network

Explanation:

In a ring network, the nodes are arranged in a circular pattern where each node is connected to two adjacent nodes. In this topology, any node can communicate with any other node via the intermediaries.

In comparison,

- in a star network every communication needs to pass through a central hub node

- in a bus, each node is connected to a shared linear communication bus.

- in a hierarchical network nodes are organized along a tree structure layout.

4 0
3 years ago
Which statement best describes the types of products and services that are suitable for online sale?
garri49 [273]

A statement which best describes the types of products and services that are suitable for online sale is: D. Not all products or services are well-suited for sale on the Internet.

<h3>What is e-commerce?</h3>

E-commerce is also referred to as an online sale and it can be defined as a business model which is designed and developed to involve the buying and selling of goods (products) over the Internet.

Basically, e-commerce technologies are designed and developed to comprises software and information technology (IT) systems which typically support safe and secure transactions over network and the Internet, so as to make e-commerce possible.

<h3>What is a product?</h3>

A product can be defined as any physical object (tangible item) that is typically produced by a manufacturer so as to satisfy and meet the demands, needs or wants of every customer. Some examples of a product include the following:

  • Mobile phones
  • Television
  • Microwave oven
  • Laptop

In conclusion, we can infer and logically deduce that it is not all products or services that are well-suited for sale on the Internet through e-commerce.

Read more on e-commerce here: brainly.com/question/23369154

#SPJ1

4 0
2 years ago
Other questions:
  • Write a recursive method named binarySearch that accepts a sorted array of integers and an integer target value and uses a recur
    6·1 answer
  • Importance of project risk management
    10·1 answer
  • Who played a leading role in perfecting movable type for printing?
    15·1 answer
  • Fill the validateForm function to check that the phone number contains a number (use the isNaN function) and that the user name
    8·1 answer
  • Suppose Alice, Bob, and Carol want to use secret key technology to authenticate each other. If they all used the same secret key
    10·1 answer
  • The M:N relationship between STUDENT and CLASS must be divided into two 1:M relationships through the use of the ENROLL entity;
    10·2 answers
  • Which paragraph from the article helps explain what “engaged” is referring to?
    9·1 answer
  • What does IDLE stand for
    11·2 answers
  • Which of the following is true about advertisements?
    15·1 answer
  • Does any of yall play rob lox?
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!