i need to write a program that- allow the user to enter the number of students-allow the user to enter each mark-calculate the frequency for each mark-the interval that exists between identical marksthis is what i have donei want to know if there is a different way of doing it

#include
#define maxsize 200
int main(){
    int x,i,j;
    int marks[maxsize];
    int frequency[maxsize]; 
    int interval[maxsize];  
    printf("Enter the number of Students: ");   
    scanf("%d",&x);
    while(x

Recommended Answers

All 4 Replies

This has got to be the worst job of posting I have ever seen anywhere on the web! If you won't make the effort to post something readable then nobody is going to make the effort to respond to your question. If you don't know how to use code tags please read this thread.

Always post your message twice, maybe the second time someone will take the efford in decoding it.... ;)

#include
#define maxsize 200
int main()
{	
    int x,i,j;	
    int marks[maxsize];
    int frequency[maxsize];	
    int interval[maxsize];	
    printf("Enter the number of Students: ");	
    scanf("%d",&x);	

    while(x ??????????????? where is the rest of the program


}

[edit]Ancient Dragon: This is what your program should look like. Notice the spacing and other formatting. Also you did not post all of the program![/edit]

well to start with what other way are u talking about????

u didnt even post the entire source code.


well heres what u can do:-

enclose the scanf and the necessary statements to compute the frequency,mean etc etc in a loop with the loop counter initialized to the number of students.

then store the results in an array and print it out.


its simple.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.