Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int f0(int n, int tab_empty) {
- if (tab_empty == 1)
- read(n);
- int Smallest = tab_int[0];
- int positionOfSmallest = 0;
- for (int i = 0; i < n; i++) {
- if (tab_int[i] < Smallest) {
- Smallest = tab_int[i];
- }
- }
- for (int i = 0; i < n; i++) {
- if (tab_int[i] == Smallest) {
- cout << i + 1 << " "; // zmiana tutaj
- }
- }
- cout << endl;
- return positionOfSmallest;
- }
Advertisement
Add Comment
Please, Sign In to add comment