can you help me program c++??

This is a discussion on can you help me program c++?? within the C++ Programming forums, part of the General Programming Boards category; in c++ the design program to read result of exam.to one graph from (N)studient from (M)subject . so the program ...

  1. #1
    sam
    sam is offline
    Registered User
    Join Date
    Dec 2001
    Posts
    3

    can you help me program c++??

    in c++ the design program to read result of exam.to one graph from (N)studient from (M)subject . so the program make off:
    1-print ( name) studient name accovding to degree.
    2-printed of the first and last in every subject.
    3-print the average class in every subject.
    (the solvent by used funcion program.)
    plese help me........

  2. #2
    Unregistered
    Guest
    I'll be glad to help you out when you've actually attempted to do it yourself. If you already have some code then post your specific problem and you'll get a better response, we won't do all of your work for you.

  3. #3
    sam
    sam is offline
    Registered User
    Join Date
    Dec 2001
    Posts
    3

    ........

    #include<iostream.h>
    int i,j;

    void main()
    {
    const int N=20;
    const int M=5;
    char name[N][5];
    float grade[N][M];
    int n;
    cout<<"enter the number of student";
    cin>>n;
    for(i=0;i<n;i++)
    {
    cout<<"enter the name of student"<<i+1<<endl;
    for(j=0;j<M;j++)
    {
    cin>>name[i][j];
    }
    }
    for(i=0;i<n;i++)
    {
    cout<<"enter the grade of student"<<i+1<<endl;
    for(j=0;j<M;j++)
    {

    cin>>grade[i][j];
    }
    }



    for(i=0;i<n;i++)
    {
    float sum;
    sum=0;
    float total;
    for(j=0;j<M;j++)
    {

    sum=sum+grade[i][j];

    }
    total=sum/M;
    cout<<"the average of student"<<i+1<<" :"<<total<<endl;
    }
    for(j=0;j<M;j++)
    {
    float avrgclass;
    float sumclass=0;
    for(i=0;i<n;i++)
    {
    sumclass=sumclass+grade[i][j];
    avrgclass=sumclass/n;

    }
    cout<<"the avrg of class "<<j+1<<" :"<<avrgclass<<endl;

    }


    can you complete program plese..
    Without employment class

  4. #4
    Unregistered
    Guest
    float grade[N][M];

    int max = 0;

    int min = 0;

    for(j = 0; j < M; j++)
    {
    for(i = 0; i < n; i++)
    {
    if(grade[i][j] > grade[max][j])
    {
    max = i;
    }
    if(grade[i][j] < grade[min][j])
    {
    min = i;
    }
    }
    cout << "best grade on test " << j << " was student # " << max + 1 << " " << name[max] << "with result " << grade[max][j] << endl;
    //etc.
    }

  5. #5
    sam
    sam is offline
    Registered User
    Join Date
    Dec 2001
    Posts
    3

    Thumbs up for Unregistered

    Thanks on your assistant to me

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Issue with program that's calling a function and has a loop
    By tigerfansince84 in forum C++ Programming
    Replies: 9
    Last Post: 11-12-2008, 01:38 PM
  2. Need help with a program, theres something in it for you
    By engstudent363 in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 01:41 PM
  3. Replies: 4
    Last Post: 02-21-2008, 10:39 AM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 11:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21