Advertisement
patryk178

Untitled

Jan 23rd, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3.  
  4. using namespace std;
  5.  
  6. bool sprawdz(float T[],int n)
  7. {
  8. for(int i=0;i<n;i++)
  9. {
  10. if(T[i]>=9)return false;
  11. }
  12. return true;
  13. }
  14.  
  15. int main()
  16. {
  17. float T[9];
  18. for(int i=0;i<9;i++)
  19. {
  20. T[i] = rand()%32-4;
  21. cout<<T[i]<<endl;
  22. }
  23.  
  24. if(sprawdz(T,9)==true)cout<<"Mniejsze od 9";
  25. else cout<<"Wieksze od 9";
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement