user-0 提问: 求大家帮忙看一下为什么run不了，我人都裂开了

回复:
user: user-1
content: 代码重新整理一下吧

user: user-2
content: #include <stdio.h> #include <stdlib.h>  /* struct polynomial {  int sign;  int num;  int index;  struct next *next; }next,head,*p;  */  struct stu{   char sign;   double num;   int index;  } a[100], b[100]; void manner( struct stu a[], int q )  { 	struct stu t; 	int o, m;  	for ( o = 0; o < q; o++ )   { 		for ( m = o + 1; m < q; m++ )      { 			if ( a[o].index < a[m].index )          { 				t = a[m]; 				a[m] = a[o]; 				a[o] = t; 			} 		} 	}  	return ; } void write( struct stu a[], int p )  { 	int i; 	printf( "%d ", p );  	for ( i = 0; i < p; i++ )      { 		printf( "%c%lfX^%d", a[i].sign, a[i].num, a[i].index ); 	}  	return ; } void plus( struct stu a[], struct stu b[] )  { 	int i = 0; 	int j = 0; 	int num1, num2;  	for ( num1 = 0; a[num1].sign == "+" || a[num1].sign == "-"; num1++ );  	for ( num2 = 0; a[num2].sign == "+" || a[num2].sign == "-"; num2++ );  	for ( i = 0; i < num1; i++ ) { 		for ( j = 0; j < num2; )        { 			if ( a[i].index == b[j].index )                { 				if ( a[i].sign == b[j].sign )                   { 					if ( a[i].sign == "+" ) { 						a[i].num += b[j].num;  					}                       else { 						a[i].sign = "-"; 						a[i].num += b[j].num; 					}  				}                   else if ( a[i].num < b[j].num ) { 					a[i].sign = b[j].sign; 					a[i].num = b[j].num - a[i].num; 				}  				b[j].sign = "$"; 				j++; 			} 		} 	}  	for ( j = 0, i = num1; j < num2; j++ )        { 		if ( b[j].sign == "+" || b[j].sign == "-" ) { 			a[i].sign = b[j].sign; 			a[i].num = b[j].num; 			a[i].index = b[j].index; 			i++; 		} 	}  	manner( a, num1 ); 	write( a, num1 ); 	return 0; } void min( struct stu a[], struct stu b[] )  { 	int i = 0; 	int j = 0; 	int num1, num2;  	for ( num1 = 0; a[num1].sign == "+" || a[num1].sign == "-"; num1++ );  	for ( num2 = 0; a[num2].sign == "+" || a[num2].sign == "-"; num2++ );  	for ( j = 0; j < num2; j++ )       { 		if ( b[j].sign == "+" ) b[j].sign = "-";  		if ( b[j].sign == "-" ) b[j].sign = "+"; 	}  	for ( i = 0; i < num1; i++ ) { 		for ( j = 0; j < num2; )        { 			if ( a[i].index == b[j].index )                { 				if ( a[i].sign == b[j].sign )                   { 					if ( a[i].sign == "+" ) { 						a[i].num += b[j].num;  					}                       else { 						a[i].sign = "-"; 						a[i].num += b[j].num; 					}  				}                   else if ( a[i].num < b[j].num ) { 					a[i].sign = b[j].sign; 					a[i].num = b[j].num - a[i].num; 				}  				b[j].sign = "$"; 				j++; 			} 		} 	}  	for ( j = 0, i = num1; j < num2; j++ )        { 		if ( b[j].sign == "+" || b[j].sign == "-" ) { 			a[i].sign = b[j].sign; 			a[i].num = b[j].num; 			a[i].index = b[j].index; 			i++; 		} 	}  	manner( a, num1 ); 	write( a, num1 ); 	return ; } int main() { 	printf( "tips:you can read it in this program for example 4X^2-3X+8 -> + 4 2 - 3 1 + 8 0\n" ); 	int mod; 	int i, j; 	int q; 	int p;  	while ( 1 )        { 		printf( " plus work plz say 1 \n min work plz say 2.\n:" ); 		scanf( "%d", &mod );  		if ( mod == 1 || mod == 2 ) break; 	}  	printf( "第一个多项式项数：" ); 	scanf( "%d", &q ); 	printf( "第二个多项式项数：" ); 	scanf( "%d", &p ); 	printf( "\nthe first polynomial's number of terms:" );  	for ( i = 0; i < q; i++ )    { 		scanf( "%c %lf %d ", &a[i].sign, &a[i].num, &a[i].index ); 	}  	printf( "the second polynomial's number of terms:" );  	for ( j = 0; j < p; j++ )    { 		scanf( "%c %lf %d ", &b[j].sign, &b[j].num, &b[j].index ); 	}  	if ( mod == 1 ) plus( a, b );  	if ( mod == 2 ) min( a, b );  	return 0; }  你这代码还能用工具拯救一下

user: user-3
content: oh, 这个代码看起来太费劲了

user: user-2
content: 我傻了都ヾ(❀╹◡╹)ﾉﾞ❀~

user: user-4
content: 就不能好好排版一下吗？