Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int const runner = 23;
- int a[runner];
- for (int i = 0; i < runner; i++) {
- a[i] = rand() % 10 + 1;
- }
- for (int i = 0; i < runner; i++) {
- cout << a[i] << " ";
- }
- int min = 100;
- int r;
- for (int i = 0; i < runner; i++) {
- if (a[i] < min) {
- min = a[i];
- r = i + 1;
- }
- }
- cout << endl;
- cout << "#" << r << " " << min;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement