English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i want to write a program to display the gpa,first enter the student score and display the grade and also calculate the number of grade please help i stuck at the half way no i don't know how to calculate gpa please help

#include
#include
#define column_size 30
#define row_size 50

void input_table(int *rows,int *column,int arr[][column_size]);
void output_table(int rows,int columns,const int arr[][column_size]);

int main()
{

int test_score[row_size][column_size];
int rows,columns,score;


input_table(&rows,&columns,test_score);
output_table(rows,columns,test_score);


return 0;
}
void input_table(int *no_of_rows,int *no_of_columns,int arr[][column_size])
{
int i,j;
printf("\n");
printf("\t\t\t------------------------\n");
printf("\n");
printf("Enter number of rows : ");
scanf("%d",&(*no_of_rows));
printf("Enter number of columns : ");
scanf("%d",&(*no_of_columns));

for(i=1;i<=*no_of_rows;i++)
for(j=1;j<=*no_of_columns;j++)
{
printf("Enter value of test score [%d][%d] :",i,j);
scanf("%d",&arr[i][j]);

}
}
void output_table(int rows,int columns,const int arr[][column_size])
{
int i,j;

system("cls");
printf("\n");
printf("\t\t\tEXAMINATION PERFORMANCE REPORT\n");
printf("\t\t\t------------------------------\n");
printf("\n");
printf("Student No\tAMCS17894\tAAC7889\tGrade Point Average\n");
printf("----------\t--------\t--------\t-------------------\n");

for(i=1;i<=rows;i++){
printf("\t\n%3d",i);
for(j=1;j<=columns;j++)
printf("\t\t%3d",arr[i][j]);
}

printf("\n\n");
printf("AVERAGE GPA = %d\n ");
printf("\n");
printf("HIGHEST GPA = %d obtained by student No.=\n");
printf("LOWEST GPA = %d obtained by student No.=\n");


}

2007-11-25 00:30:55 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

what part actually causes the problem?

2007-11-25 00:44:35 · answer #1 · answered by colo 3 · 0 0

This link gives you the gpa.
Select the one that applies and create the function to do the calculation.

2007-11-25 10:04:14 · answer #2 · answered by AnalProgrammer 7 · 1 0

fedest.com, questions and answers