Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- void unos(int niz[6]){
- int a = 0;
- cout << "Unesite 7 el. niza: " << endl;
- for (int i = 0; i <= 6; i++)
- cin >> a;
- }
- int djeljiv(int niz[])
- {
- int brojac = 0;
- for (int i = 0; i < 6; i++)
- {
- if (niz[i] % 5 == 0)
- {
- brojac++;
- }
- }
- return brojac;
- }
- void povecaj(int niz[])
- {
- for (int i = 0; i < 6; i++)
- {
- if (niz[i] % 2 == 0)
- {
- cout << niz[i] * 2;
- }
- }
- }
- int main()
- {
- int niz[6];
- for (int i = 0; i < 6; i++)
- {
- cin >> niz[i];
- }
- cout << "Broj djeljenih sa 5 je " << djeljiv(niz) << endl;;
- povecaj(niz);
- system("pause>null");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement