[Plain]
/* Start the comments in the program header (to avoid any problems encountered during the submission of blog posts, the slash used to indicate that the comments have been deleted)
* Copyright and version Declaration of the program
* All rights reserved.
* File name: txt. c
* Author: liuyongshui
* Completion date: January 1, April 24, 2013
* Version No.: V1.0
*/
# Include <stdio. h>
# Include <stdlib. h>
Int main ()
{
Int I;
Int j;
Int n;
Int count = 0;
Int sum [7] = {0 };
Int total [7] = {0 };
Int num [] = {3, 6, 2, 1, 4, 5, 2 };
N = 0;
For (I = 0; I <7; I ++) // sum
{
N + = num [I];
Sum [I] = n;
}
N = 0;
For (I = 6; I> = 0; I --) //
{
N + = num [I];
Total [I] = n;
}
For (I = 0; I <7; I ++)
{
For (j = 0; j <7; j ++)
{
If (sum [I] = total [j])
{
Count ++;
}
}
}
Printf ("the array num [] contains % d group front and equals to rear and \ n", count );
Return 0;
}
/* Start the comments in the program header (to avoid any problems encountered during the submission of blog posts, the slash used to indicate that the comments have been deleted)
* Copyright and version Declaration of the program
* All rights reserved.
* File name: txt. c
* Author: liuyongshui
* Completion date: January 1, April 24, 2013
* Version No.: V1.0
*/
# Include <stdio. h>
# Include <stdlib. h>
Int main ()
{
Int I;
Int j;
Int n;
Int count = 0;
Int sum [7] = {0 };
Int total [7] = {0 };
Int num [] = {3, 6, 2, 1, 4, 5, 2 };
N = 0;
For (I = 0; I <7; I ++) // sum
{
N + = num [I];
Sum [I] = n;
}
N = 0;
For (I = 6; I> = 0; I --) //
{
N + = num [I];
Total [I] = n;
}
For (I = 0; I <7; I ++)
{
For (j = 0; j <7; j ++)
{
If (sum [I] = total [j])
{
Count ++;
}
}
}
Printf ("the array num [] contains % d group front and equals to rear and \ n", count );
Return 0;
}