Selection Sort bir sıralama algoritmasıdır.Selection Sort hakkında daha fazla bilgi için Selection Sort Vikipedi sayfasına buraya tıklayarak ulaşabilirsiniz.
Yazdığım C++ Kodu :
// Arda Mavi - ardamavi.com
// iostream kütüphanesini dahil etmeyi unutmayınız !
using namespace std;
int main() {
cout << "Kaç sayı girilecek ? ";
int n;
cin >> n;
int arr[n];
int swp;
for (int i = 0; i < n; i++) {
cin >> arr[i];
}
for(int i = 0; i < n; i++) {
int min[2] = {99999, 0};
for (int m = i; m < n; m++) {
if (min[0] > arr[m]) {
min[0] = arr[m];
min[1] = m;
}
}
swp = arr[min[1]];
arr[min[1]] = arr[i];
arr[i] = swp;
}
for (int b = 0; b < n; b++) {
cout << " | " << arr[b] << " | ";
}
return 0;
}
Umarım yararlı olmuştur.- Staj Notlarımdan -


However, it's all the time good to do research on a selected market earlier than you choose the video games for your platform. This will assist you to supply those with the highest level of demand. Your research should also to|must also} embrace what video games are allowed during which regions — and at the end of the day, you need to|you should|you have to} 토토사이트 ensure your content material is certified for the market you’d like to target.
YanıtlaSil