Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void calculation_array(int a[], const int size)
- {
- int Numero;
- for (int j = 0; j < size; j++)
- {
- Numero = a[j];
- for (int i = Numero - 1; i > 1; i--)
- if (Numero % i == 0)
- cout << "число не простое";
- }
- cout << "Numeri interi: " << Numero << "\n";
- }
- int enter_array(int a[], const int size)
- {
- for (int i = 0; i < size; i++)
- {
- cout << "Enter a[" << i << "] ";
- return a[i];
- }
- }
- void imput_array(int a[], const int size)
- {
- for (int i = 0; i < size; i++)
- cin >> a[i];
- }
- int main()
- {
- const int size = 10;
- int a[size];
- enter_array(a, size);
- imput_array(a, size);
- calculation_array(a, size);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement