You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							24 lines
						
					
					
						
							337 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							24 lines
						
					
					
						
							337 B
						
					
					
				
								function coupon3() {
							 | 
						|
									int coup0 := 0;
							 | 
						|
									int coup1 := 0;
							 | 
						|
									int coup2 := 0;
							 | 
						|
								
							 | 
						|
									int draw := 0;
							 | 
						|
								
							 | 
						|
									int numberDraws := 0;
							 | 
						|
								
							 | 
						|
									while (!(coup0 = 1) | !(coup1 = 1) | !(coup2 = 1)) {
							 | 
						|
										draw := unif(0,2);
							 | 
						|
										numberDraws := numberDraws + 1;
							 | 
						|
								
							 | 
						|
										if(draw = 0) {
							 | 
						|
											coup0 := 1;
							 | 
						|
										}
							 | 
						|
										if(draw = 1) {
							 | 
						|
											coup1 := 1;
							 | 
						|
										}
							 | 
						|
										if(draw = 2) {
							 | 
						|
											coup2 := 1;
							 | 
						|
										}
							 | 
						|
									}
							 | 
						|
								}
							 |