본문 바로가기
프로그래밍 기록/stl

random_shuffle

by hominic 2023. 12. 9.
728x90
반응형

random_shuffle

반응형
#include <iostream>
#include <algorithm>
using namespace std;

void main()
{
	char str[]="abcdefghijklmnopqrstuvwxyz";
	
	randomize();
	puts(str);
	random_shuffle(&str[0],&str[strlen(str)]);puts(str);
	random_shuffle(&str[0],&str[strlen(str)]);puts(str);
	random_shuffle(&str[0],&str[strlen(str)]);puts(str);
}
728x90
반응형

'프로그래밍 기록 > stl' 카테고리의 다른 글

replace,partition,transform,sort,lower_bound  (0) 2023.12.09
generate, remove, remove_copy, unique  (0) 2023.12.09
fill  (0) 2023.12.09
copy  (0) 2023.12.09
count  (0) 2023.12.09

댓글