There is no problem in compiling and connecting, and there is no result in running

CSDN Q & A 2022-05-15 04:47:43 阅读数:942

problemcompilingconnectingresultrunning

img


There is no problem compiling and connecting , But the operation has no result . Can anyone help me answer ?




Take the answer :

img


The code in the figure above is modified as follows , For reference :

#include <stdio.h>int main(){ char a[16]; int i, b, c; Out:printf(" Please enter the student number :"); for (i = 0; (a[i] = getchar()) != '\n'; i++); if (i != 12) goto Out; c = (a[0] - '0') * 1000 + (a[1] - '0') * 100 + (a[2] - '0') * 10 + a[3] - '0'; if (c < 2018 || c>2021) goto Out; //..... Source code  //..... return 0;}

版权声明:本文为[CSDN Q & A]所创,转载请带上原文链接,感谢。 https://primo.wiki/2022/131/202205041636083974.html