Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- #include <cmath>
- using namespace std;
- int zamien(int tab[], bool) {
- static int wywolania;
- for (int i = 0; i < 10; i++) {
- if (i < 0) {
- abs(i);
- return abs(i);
- }
- else {
- return i;
- }
- wywolania++;
- }
- }
- int main()
- {
- int tab[10];
- cout << "Podaj 10 liczb calkowitych";
- zamien(tab, false); {
- cin >> tab[0];
- cin >> tab[1];
- cin >> tab[2];
- cin >> tab[3];
- cin >> tab[4];
- cin >> tab[5];
- cin >> tab[6];
- cin >> tab[7];
- cin >> tab[8];
- cin >> tab[9];
- zamien(tab, false);
- cout << tab[0] << endl; cout << tab[1] << endl; cout << tab[2] << endl;
- cout << tab[3] << endl; cout << tab[4] << endl;
- cout << tab[5] << endl; cout << tab[6] << endl; cout << tab[7] << endl;
- cout << tab[8] << endl; cout << tab[9] << endl; }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement