-
var는function-scoped이고,let,const는block-scoped입니다. -
function-scoped와block-scoped가 무슨말이냐?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int n=0, k=0; | |
| int arr[100]; | |
| void recur(int depth){ | |
| if(depth == n){ | |
| for(int j=0; j<n; j++){ | |
| cout << arr[j] <<" "; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int n=0, k=0; | |
| bool visited[100]; | |
| int arr[100]; | |
| void recur(int depth){ | |
| if(depth == n){ | |
| for(int j=0; j<n; j++){ | |
| cout << arr[j] <<' '; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int n=0, k=0; | |
| int arr[100]; | |
| void recur(int depth){ | |
| if(depth == n){ | |
| for(int j=0; j<n; j++){ | |
| cout << arr[j] <<' '; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int n=0, k=0; | |
| int arr[100]; | |
| void recur(int depth, int start){ | |
| if(depth == n){ | |
| for(int j=0; j<n; j++){ | |
| cout << arr[j] <<' '; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int n=0, k=0; | |
| int arr[100]; | |
| void recur(int depth, int start){ | |
| if(depth == n){ | |
| for(int j=0; j<n; j++){ | |
| cout << arr[j] <<' '; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <algorithm> | |
| using namespace std; | |
| int n=0, k=0; | |
| int input[100]; | |
| int arr[100]; | |
| void recur(int depth){ | |
| if(depth == n){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int n=0; | |
| bool isPrime(int num){ | |
| if(num == 0) return true; | |
| if(num == 1) return false; | |
| int cnt = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <algorithm> | |
| using namespace std; | |
| int n=0, k=0; | |
| int mo=0, za=0; | |
| char input[20]; | |
| char arr[100]; | |
| bool visited[20]; | |
| void recur(int depth, int mcnt, int zcnt){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <algorithm> | |
| using namespace std; | |
| int n=0, k=0; | |
| int mo=0, za=0; | |
| char input[20]; | |
| char arr[100]; | |
| bool visited[20]; | |
| void recur(int depth, int start, int mcnt, int zcnt){ |
OlderNewer