I'm making a program that would do something like this:
Enter the mark out of 10 for a set of 20 students:
7 6 9 4 7 7 5 10 8 6 5
Below is the chart of number of students vs mark out of 10
Number Of
Students
10| *
9| *
8| *
7| *
6|
5| *
4| *
3| *
2| *
1| *
0|
-------------------------------------------
0 1 2 3 4 5 6 7 8 9 10
(Marks out of 10)
Please note that the stars will not line up properly in this post, but you all get the idea. The stars is suppose to go to the intersection of the Number of the Student, and his/her mark.
I made an array of 10 ints. Now I'm guessing that the *'s in the chart will be entered by using pointers? Since I'm not too familiar with pointers, please someone give me an example of how to do this.
And the with the chart itself, I just use printf() to enter them in a fixed location? ex:
I am very new at this so please bare with me. I do apologize that my questions may seem stupid since this work may seem very easy from your standards.Code:printf("\n"); printf("\n"); printf("Number of\n"); printf("Students\n"); printf("\n"); printf("10|\n"); printf("\n"); printf("9 |\n"); printf("\n"); printf("8 |\n"); printf("\n"); printf("7 |\n"); printf("\n"); printf("6 |\n"); printf("\n"); printf("5 |\n"); printf("\n"); printf("4 |\n"); printf("\n"); printf("3 |\n"); printf("\n"); printf("2 |\n"); printf("\n"); printf("1 |\n"); printf("\n"); printf("0 |\n"); printf(" --------------------------------------------------------------\n"); printf(" 0 1 2 3 4 5 6 7 8 9 10\n"); printf(" Mark (10) \n");