how to get out of function in c

Solutions on MaxInterview for how to get out of function in c by the best coders in the world

showing results for - "how to get out of function in c"
Paulina
07 Mar 2019
1void limit(int stop){
2	int x;
3  	for(x=0;x<=100;x=x+1){
4    	printf("%d ",x);
5      	if(x==stop){
6        	puts("You won!");
7        	return;
8        }
9    }
10	puts("I won!");
11}