Write a c++ program that accepts a positive integer N greater than zero from the keyboard. in your main program, create an integer of size N and populate the array. from main, the program then calls the following functions: 1. Array calculation: the purpose of the function is to find the smallest number and the largest number in the array. the function will return the values back to the main program. 2.Currency Calculation: Assuming that the number N represents the number of pennies, the function computes the number of quarters, dimes, nickels, and pennies to be displayed.D displaying as many quarters as possible, then dims then nickels, and pennies in that order. 3.Person age : Assuming that the number N represents a person age. the function then calculates and displays statistics about age. assuming that there are 365 days in a year, the program displays the following information: Number of months, days, hours, minutes. 4-Number separation: The function should separate the numbers N into its individual digits and display on a screen the digits separated from one another by three spaces each. the function then displays each digit of the integer in English. For example, if the number is 1234 the output should be " 1 2 3 4 one Two Three Four  5.Number Sequence: For the integer N, the sequence starting at n is obtained as follows. you write a sequence of numbers, one after another. Start by writing n. If n is even then the next number is n/2. if n is odd then the next number is 3n+1.continue in this way until you write the number 1. For example, the number sequence starting at 6 is (6,3,10,5,16,8,4,2,1). 6.Prime numbers: Function that indicates whether or not the integer N that was entered is prime. The function also displays all the prime numbers between 1 and that number. For example, if the number is 4, the output should be: 4 is not prime All primes between 1 and 4 are 2 number is prime 3 number is prime

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.3: Declaring And Processing Two-dimensional Arrays
Problem 6E
icon
Related questions
Question

Write a c++ program that accepts a positive integer N greater than zero from the keyboard.

in your main program, create an integer of size N and populate the array.

from main, the program then calls the following functions:

1. Array calculation: the purpose of the function is to find the smallest number and the largest number in the array. the function will return the values back to the main program.

2.Currency Calculation: Assuming that the number N represents the number of pennies, the function computes the number of quarters, dimes, nickels, and pennies to be displayed.D displaying as many quarters as possible, then dims then nickels, and pennies in that order.

3.Person age : Assuming that the number N represents a person age. the function then calculates and displays statistics about age. assuming that there are 365 days in a year, the program displays the following information: Number of months, days, hours, minutes.

4-Number separation: The function should separate the numbers N into its individual digits and display on a screen the digits separated from one another by three spaces each. the function then displays each digit of the integer in English.

For example, if the number is 1234 the output should be "

1 2 3 4

one Two Three Four 

5.Number Sequence: For the integer N, the sequence starting at n is obtained as follows.

you write a sequence of numbers, one after another. Start by writing n. If n is even then the next number is n/2. if n is odd then the next number is 3n+1.continue in this way until you write the number 1. For example, the number sequence starting at 6 is (6,3,10,5,16,8,4,2,1).

6.Prime numbers: Function that indicates whether or not the integer N that was entered is prime. The function also displays all the prime numbers between 1 and that number. For example, if the number is 4, the output should be:

4 is not prime

All primes between 1 and 4 are

2 number is prime

3 number is prime 

 

Each Step must be implemented in a separat
-
function.
Must pass integers or arrays to functions in
each step.
You are not allowed to use global arrays /
global variables.
- Include The Following Libraries
:
#include <iostream>
#include <time.h>
#include <stdlib.h>
Transcribed Image Text:Each Step must be implemented in a separat - function. Must pass integers or arrays to functions in each step. You are not allowed to use global arrays / global variables. - Include The Following Libraries : #include <iostream> #include <time.h> #include <stdlib.h>
Enter a Positive integer Number > 0
--> X
*** Error
invalid input
X
---
re-run the app & use a positive number > 0
Transcribed Image Text:Enter a Positive integer Number > 0 --> X *** Error invalid input X --- re-run the app & use a positive number > 0
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,