Menu
Question Index
...

Write a program to print the runs per over chart using hashes as shown below. The runs per over are given.

Input (int[]) Printed Output
{5, 7, 8, 3, 2, 11, 10}           #
          # #
          # #
    #     # #
  # #     # #
  # #     # #
# # #     # #
# # #     # #
# # # #   # #
# # # # # # #
# # # # # # #
- - - - - - -
1 2 3 4 5 6 7
{9, 2, 6, 5, 6, 2, 1} #
#
#
#   #   #
#   # # #
#   # # #
#   # # #
# # # # # #
# # # # # # #
- - - - - - -
1 2 3 4 5 6 7
{4, 12, 20, 5, 5, 7, 5, 9, 12}     #
    #
    #
  # #           #
  # #           #
  # #           #
  # #         # #
  # #         # #
  # #     #   # #
  # #     #   # #
  # # # # # # # #
# # # # # # # # #
# # # # # # # # #
# # # # # # # # #
# # # # # # # # #
- - - - - - - - -
1 2 3 4 5 6 7 8 9
{1, 0, 5, 6, 7, 10, 15, 16, 7}               #
            # #
            # #
            # #
            # #
            # #
          # # #
          # # #
          # # #
        # # # # #
      # # # # # #
    # # # # # # #
    # # # # # # #
    # # # # # # #
    # # # # # # #
#   # # # # # # #
- - - - - - - - -
1 2 3 4 5 6 7 8 9


import java.util.*;
class PrintRunsPerOverChart
{
    public static void main(String s[])
    {
        int[] input = {5, 7, 8, 3, 2, 11, 10};
        printChart(input);

    }


    public static void printChart(int[] input) {
    }

}

Doubts

Problems

Topic: Learn Arrays And Loops

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App