Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

how to get out of function in c

void limit(int stop){
	int x;
  	for(x=0;x<=100;x=x+1){
    	printf("%d ",x);
      	if(x==stop){
        	puts("You won!");
        	return;
        }
    }
	puts("I won!");
}
 
PREVIOUS NEXT
Tagged: #function
ADD COMMENT
Topic
Name
7+3 =