Nov 16, 2003 22:17
Well been home from work for a while now. This is my first post. Hoping that you may care about me if you are reading this. These last few days have been tough and i'm at a down right now.
Once I spend time tomorrow i'll get this updated and lookin shnazzy.
I have a ton of homework to do tonight so i'm off. Peace.
Leave a comment
Comments 3
-Grant
Reply
#include
#define STUDENTS 3
#define EXAMS 4
void minimum( int [][ EXAMS ], int, int );
void maximum( int [][ EXAMS ], int, int );
void average( int [][ EXAMS ], int, int );
void printArray( int [][ EXAMS ], int, int );
void printMenu( void );
int main()
{
void ( *processGrades[ 4 ] )( int [][ EXAMS ], int, int )
= { printArray, minimum, maximum, average};
int student, input = 0,
studentGrades[ STUDENTS ][ EXAMS ] =
{ { 77, 68, 86, 73 },
{ 96, 87, 89, 78 },
{ 70, 90, 86, 81 } };
while ( input != 4 ) {
do {
printMenu();
scanf( "%d", &input );
} while ( input < 0 || input > 4 );
if ( input != 4 )
( *processGrades[ input ] )( studentGrades, STUDENTS, EXAMS );
else
printf( "Program Ended.\n" );
}
return 0;
}
void minimum( int grades[][ EXAMS ], int pupils, int tests )
{
int i, j, lowGrade = 100;
for ( i = 0; i <= pupils - 1; i++ )
for ( j = 0; j <= tests - 1; j ( ... )
Reply
int bigArray[ size ][ size - 1];
for ( y = 0; y <= digits; y++ ) {
for ( x = 0; x <= size - 1; x++ ) {
y = ( ( x / pow( 10, y ) ) - floor( x / pow( 10, y ) ) ) * pow( 10, y );
array[ x ] = bigArray[y][];}
}
return array[]; }
Reply
Leave a comment