Facebook
From Coral Crow, 7 Years ago, written in C++.
Embed
Download Paste or View Raw
Hits: 428
  1. Zad.3 laborki 9
  2.  
  3. #include<stdlib.h>
  4. #include<ctime>
  5. #include<iostream>
  6. using namespace std;
  7. int main()
  8. {
  9.         int i=0;
  10.         srand ( time(NULL) );
  11.         int t[10];
  12.         for(i=0;i<10;i++)
  13.         {
  14.                 t[i]=rand() % 2;
  15.                 cout<<t[i];
  16.         }
  17.         cout<<"        ";
  18.         for(i=0;i<10;i++)
  19.         {
  20.         if (t[i]==0)
  21.         {
  22.         cout<<t[i];
  23.         }
  24.         }
  25.         for(i=0;i<10;i++)
  26.         {
  27.         if(t[i]==1)
  28.         {
  29.         cout<<t[i];
  30.         }              
  31.         }
  32.         return 0;
  33. }
  34.  

Replies to Untitled rss

Title Name Language When
Re: Untitled Idiotic Kangaroo cpp 7 Years ago.