IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   C ve C++ (https://www.ircforumlari.net/c-ve-c/)
-   -   Baloncuk Döngü Kod. (https://www.ircforumlari.net/c-ve-c/124355-baloncuk-dongu-kod.html)

Cemalizim 19 Temmuz 2008 15:15

Baloncuk Döngü Kod.
 
PHP- Kodu:

#include<iostream.h>
#include<conio.h>
#include<algorithm>

 
template <class T>

 
void swap (TaTb);
 {
 }

Rogue Wave Standard C++ Library User's Guide and Tutorial
const N=6;

main ()

{
int i,j;
int temp;
int number[N];

for (i=0;i<N;i++)
{
 cout<<" enter " <<i<< "  number :"<<endl;
 cin >>number[i];
 cout<<endl;
}

for (i=0;i<N-1;i++)
for (j=i+1;j<N;j++)
if (number [i]<number [j])
{
temp=number[i];
number[i]=number[j];
number[j]=temp;
swap(number[i],number[j];
}
for (i=0;i<N;i++)
cout<<number[i]<<" ";
getch();





Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 07:06.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2025 IRCForumlari.Net Sparhawk