C语言实现对称函数并循环执行:代码修复与优化
#include <stdio.h> #include <stdlib.h>
#define N 100
typedef struct { int id; char name[50]; } elem;
void symmetry(elem str[]) { // code for symmetry function }
int main() { char d = 'N'; elem str[N];
LOOP:
if (d == 'N') {
symmetry(str);
printf("press Q for exit, N for continue\n");
scanf(" %c", &d);
goto LOOP;
}
return 0;
}
原文地址: https://www.cveoy.top/t/topic/pKnI 著作权归作者所有。请勿转载和采集!