Fixing loop variables
This commit is contained in:
		
							
								
								
									
										15
									
								
								examples/boucles_var.spf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								examples/boucles_var.spf
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,15 @@ | ||||
| entier x = 0; | ||||
| tant que x < 10 faire { | ||||
| 	entier y = x; | ||||
| 	x = x + 1; | ||||
| 	afficher x, y; | ||||
| } | ||||
|  | ||||
| afficher "yess"; | ||||
|  | ||||
| pour chaque entier i dans [1:5] faire { | ||||
| 	entier y = i; | ||||
| 	y = y + i; | ||||
| 	x = x + i; | ||||
| 	afficher x, y; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user