0
2.3kviews
Write a C program to display particular output

Write a C program to display output as shown in the image below. The user must enter a student id and the output will show the marks and histrogram.

C program output

1 Answer
0
4views

Program

#include < stdio.h >

int main() {
    int n;
    printf("Enter number of entries ");
    scanf("%d", & n);

    int id[n], marks[n];
    for (int i = 1; i <= n; i++) {
        printf("\nEnter Student id and marks ");
        scanf("%d %d", & id[i], & marks[i]);
    }
    printf("\n\n");
    printf("Student id\t\t\tMarks\t\t\t\tHistogram\n");
    for (int i …

Create a free account to keep reading this post.

and 2 others joined a min ago.

Please log in to add an answer.