Facebook
From Coral Water Vole, 7 Years ago, written in C++.
This paste is a reply to Re: Re: Re: Untitled from Colossal Baboon - go back
Embed
Viewing differences between Re: Re: Re: Untitled and Re: Re: Re: Re: Untitled
Zad.laborki 10

10(nie wpisuje do pliku, lenistwo)

#include
#include
#include
using namespace std;

void d(int *t,int s)
sortowanie_babelkowe(int t,int n)
{
        int p=0;
        
for(int i=0;i<100;i++)
        
i=0;i  {
        if(p "i"
        {
                p=t[i];
for(int j=1;j     {
        
            if(t[j-1]>t[j])
            {
              swap(t[j-1], t[j]);
    
                }
        }
 }
cout< }

int main()
{
        int s=0;
        
n=10;
        
int t[100];
        
t[n];
        
for(int i=0;i<100;i++)
i=0;i<10;i++)
        {
                t[i]=rand() % 1001; //losowanie od 0 do 1000
                if(t[i]>s)
                {
                        s=t[i];
                }
1000 + wyświetlenie
                cout<
        }
        cout<<"nawieksza liczba to "<         d(t,s);
        
cout<         sortowanie_babelkowe(t,n);
        for(int i=0;i         {
          cout<         }
 
  cout<         

return 0;
}
}