Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int
- main ()
- {
- int m, n, i, j;
- int broj, broj1, pom, cifra, suma = 0, broj2 = 0;
- scanf ("%d %d", &m, &n);
- if (m < n)
- {
- for (i = m + 1; i < n; i++)
- {
- broj = 0;
- broj1 = 0;
- for (j = 1; j <= i; j++)
- {
- if (i % j == 0)
- broj++;
- }
- pom = i;
- while (pom > 0)
- {
- cifra = pom % 10;
- if (cifra % 2 == 0)
- broj1++;
- pom /= 10;
- }
- if (broj == 2 && broj1 >= 1)
- {
- printf ("%d\n", i);
- suma += i;
- broj2++;
- }
- }
- printf ("%.3f", 1.suma / broj2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement