Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int S;
- int K;
- cin >> S;
- cin >> K;
- int cifri[10];
- for (int i = 0; i < 10; i++)
- {
- cifri[i] = 0;
- }
- for (int i = S; i <= K; i++)
- {
- int broj = i;
- while (broj > 0)
- {
- int posledna_cifra = broj % 10;
- broj /= 10;
- cifri[posledna_cifra]++;
- }
- }
- for (int i = 0; i < 10; i++)
- {
- cout << cifri[i] << " ";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement