Professional Documents
Culture Documents
#define MAXROWS 30
#define MAXCOLS 30
void readinput(int a[][MAXCOLS],int m,int n);
void computeproduct(int a[][MAXCOLS],int b[][MAXCOLS],int c[][MAXCOLS],int
m,int n,int p);
void writeoutput(int c[][MAXCOLS],int m,int p);
int z=0;
void main()
{
/* char c;*/
int nrows,ncols,mrows,mcols;
int a[MAXROWS][MAXCOLS],b[MAXROWS][MAXCOLS],c[MAXROWS][MAXCOLS];
clrscr();
printf("
First table:<BR>);
readinput(a,nrows,ncols);
printf("
Second table:<BR>);
readinput(b,mrows,mcols);
computeproduct(a,b,c,nrows,ncols,mcols);
printf("
getch();
}
void main()
{
char c;
clrscr();
printf(" Please enter a line of text below<BR>);
reverse();
printf("
is the reversed form.");
getch();
}
void reverse(void)
/* read a line of characters & write it out backwards */
{
char c;
if ((c=getchar())!=EOLN)
reverse();
putchar(c);
return;
}
#include <stdio.h>
#include <conio.h>
# define EOLN '
'
void reverse(void); /* function prototype */
void main()
{
char c;
clrscr();
printf(" Please enter a line of text below<BR>);
reverse();
printf("
is the reversed form.");
getch();
}
void reverse(void)
/* read a line of characters & write it out backwards */
{
char c;
if ((c=getchar())!=EOLN)
reverse();
putchar(c);
return;
}