a) Write a FORTRAN subroutine named "count" which receives an integer array, where the values are between 1 and 9 (both included), and array size and twice of this size to be used as the size of the new array. The subroutine should find and return the values from 1 to 9 and the number of times they are repeated in another array. Example: If a=(3,6,6,1,1,7,3,1) then count(a, 8, b, 16) will return an array which is: (1,3,2,0,3,2,4,0,5,0,6,2,7,1,8,0,9,0)

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 1TF: Mark the following statements as true or false. A double type is an example of a simple data type....
icon
Related questions
Question
a)
Write a FORTRAN subroutine named "count" which receives an integer array, where
the values are between 1 and 9 (both included), and array size and twice of this size to be used
as the size of the new array. The subroutine should find and return the values from 1 to 9 and
the number of times they are repeated in another array.
Example:
If a=(3,6,6,1,1,7,3,1) then count(a, 8, b, 16) will return an array which is:
(1,3,2,0,3,2,4,0,5,0,6,2,7,1,8,0,9,0)
Transcribed Image Text:a) Write a FORTRAN subroutine named "count" which receives an integer array, where the values are between 1 and 9 (both included), and array size and twice of this size to be used as the size of the new array. The subroutine should find and return the values from 1 to 9 and the number of times they are repeated in another array. Example: If a=(3,6,6,1,1,7,3,1) then count(a, 8, b, 16) will return an array which is: (1,3,2,0,3,2,4,0,5,0,6,2,7,1,8,0,9,0)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Functions
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++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning