goto语句在C语言中不主张使用,可以用循环中加判断调用函数方式实现.goto简单的使用:main(){ int a,b,c=0;loop: scanf("%d %d",&a,&b); if(a>b) goto loop1; else goto loop;loop1: c=b; b=a; a=b; printf("a=%d b=%d",a,b);。
2024-07-01 12:32:56 来源: 编辑:
goto语句在C语言中不主张使用,可以用循环中加判断调用函数方式实现.goto简单的使用:main(){ int a,b,c=0;loop: scanf("%d %d",&a,&b); if(a>b) goto loop1; else goto loop;loop1: c=b; b=a; a=b; printf("a=%d b=%d",a,b);。