-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
81 lines (53 loc) · 1.48 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/*
* File: main.cpp
* Author: Josh
*
* Created on September 21, 2017, 3:59 PM
*/
//============================================================================
// Name : NineDifferentNumbers.cpp
// Author : Josh Holland
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
/**
* ** This program goes through the 1,2,3,4,5,6,7,8,9 number
* sequence and makes all the possible combinations
* of these numbers without using one number twice
*
*
* 1. There will be 9! (362880) different numbers tested
* 2.
*
*
*/
#include <iostream>
using namespace std;
const int NUMBER_OF_NUMBERS=9;
const int ORIGIN[] = {1,2,3,4,5,6,7,8,9};
void swap(int*first, int*second);
void rotate(int* r[]);
int main() {
int currentRotation[NUMBER_OF_NUMBERS];
for(int i=0;i<NUMBER_OF_NUMBERS;i++){
currentRotation[i]=ORIGIN[i];
}
int currentCombination[NUMBER_OF_NUMBERS];
enum positions{a,b,c,d,e,f,g,h,i};
for(int a=1;a<=9;a++){//position a will stop
}
return 0;
}
void swap(int*first, int*second){
int *temp=first;
second=first;
first=temp;
}
void rotate(int* r[]){
}