文章
2
粉丝
0
获赞
5
访问
502
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
//统计#的数量
int calc(char temp[], int index){
int count = 0;
for(int i = 0; i < index; i++){
if(temp[i] == '#'){
count++;
}
}
return count;
}
//判断某一层是否对称
int marror(char temp[], int index){
int low, high;
low = 0;
high = index -1;
while(low<high){
if(temp[low]=='#'&&temp[high]!='#'){
return 0;
}
if(temp[low]!='#'&&temp[high]=='#'){
&nbs...
登录后发布评论
暂无评论,来抢沙发