Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n = 200;
- printf("Vavedi golemina na n: ");
- scanf("%d", &n);
- while(n > 100){
- printf("Vavedenoto chislo n trqbva da e po - malko ili ravno na 100\n");
- printf("Vavedi golemina na n: ");
- scanf("%d", &n);
- }
- int arr[n];
- for(int i = 0; i < n; i++){
- printf("Vavedi chislo: ");
- scanf("%d", &arr[i]);
- }
- int pr = 1;
- for(int i = 0; i < n; i++){
- if(arr[i] > 0 && arr[i] % 5 == 0){
- pr = pr * arr[i];
- }
- }
- printf("Proizvedenieto e ravno na %d", pr);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement