Guest User

Untitled

a guest
Jun 25th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. const int size = 100;
  2. float A[size];
  3. //запросить n
  4. int n;
  5. cout << "Длинна массива (<100)?"; cin >> n;
  6. int gs = 0;
  7. //генерир сл чисел
  8. srand(time(NULL));
  9. for (int i = 0; i < n; i++)
  10. {
  11. A[i] = rand() % 100 * pow((double)(-1), rand() % 10);
  12. cout << A[i] << "\t";
  13. }
  14. cout << "\n";
Add Comment
Please, Sign In to add comment