All pastes #462339 Raw Edit

Something

public c v1 · immutable
#462339 ·published 2007-04-28 06:24 UTC
rendered paste body
/* this is a quick rewrite of the multiplication table program   so that it uses a function */   #include <stdio.h>#include <math.h>#define LOWER 0   /* the lower and upper limit for the multiplication table */#define UPPER 12int multiply( int x, int y );int main(){	int i, j, k, l;	i = j = k = l = 0;		for ( i = LOWER; i <= UPPER; ++i)		printf("\t%d", i);			printf("\n");		for ( i = LOWER; i <= UPPER; ++i)	{		printf("\t");		k = (log10(i)) + 1; /* k = number of digits, i */		for ( l = 0; l < k; ++l )			printf("-");	}		printf("\n");		for ( i = LOWER; i <= UPPER; ++i)	{		printf("%2d |", i);		for ( j = LOWER; j <= UPPER; ++j)		{			printf("\t%d", multiply(i,j));		} 		printf("\n");	}		return 0;}int multiply( int x, int y){	return x*y;}