Courbe_Impliquee

1

Dec 5th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <time.h>
  4. using namespace std;
  5. const int n=10;
  6.  
  7. int main()
  8. {
  9. float a[n];
  10. for (int i=0; i<n; i++){
  11. a[i] = rand() %100 + 1;
  12. cout << a[i] << " ";
  13. }
  14. cout <<endl;
  15. for (int i=0; i<n; i++){
  16. if (i%2==1){
  17. cout << a[i] << " ";
  18. }
  19. }
  20. cout <<endl;
  21.  
  22. return 0;
  23. }
Add Comment
Please, Sign In to add comment