#include #include struct item { int data; struct item *next; }; struct item *start = NULL, *end = NULL; int main() { int data; struct item *i, *j; while ( scanf("%d", &data) == 1 ) { struct item *new = malloc( sizeof(struct item) ); new -> data = data; new -> next = NULL; if ( !start ) { start = new; } else { end -> next = new; } end = new; } for ( i = start; i; i = i -> next ) { for ( j = start; j; j = j -> next ) { printf(j==start?"%d":" %d", i->data * j-> data ); } putchar('\n'); } return 0; }