Generate graph from input 1-D array (Josh Software programming test problem-1)

Following program was asked by Josh Software during campus recruitment.
Write a program to generate following chart without using any graph library.This is of marks from 1 to 5 obtained by 10 student represented by an array as [2,4,5,1,2,4,1,1,5,2]
Y axis denote marks and X axis denotes student role number.

Josh software apti program

Variation of problem:
Write a program to generate graph (Roll number Vs marks obtained) without using any graph library. Accept marks of n student from user, represented by an array . Y axis denote marks and X axis denotes student role number.

If you have any problem with code,please comment below.

About Gaurav Vichare

Hi , I am Gaurav : author of this blog , Software engineer and a Photoshop lover . You can connect with me on Facebook , cirlce me on Google or follow on Twitter