Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int v[3] = [{1,3,2};
- int ax;
- if((v[0]<v[1]) && (v[0] < v[2]) && (v[2] > v[1])){
- ax = v[1];
- v[1] = v[2];
- v[2] = ax;
- }
- if((v[1] < v[0]) && (v[1] < v[2])){
- if(v[0] < v[2]){
- ax = v[0];
- v[0] = v[1];
- v[1] = ax;
- } else {
- ax = v[0];
- v[0] = v[2];
- v[2] = ax;
- }
- }
- if((v[2] < v[0]) && (v[2] < v[1]) && (v[0] > v[1])){
- ax = v[1];
- v[1] = v[0];
- v[1] = v[2];
- v[2] = ax;
- }
- printf("%d - %d - %d\n", v[0], v[1], v[2]);
- system("pause");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement