Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>//||
- using namespace std;
- int main()
- {
- unsigned n,c,dr,cif,aparitii=0,cn;
- cout<<"n=";cin>>n;
- cout<<"c=";cin>>c;
- dr=c+1;
- c--;
- while (c<=dr)
- {
- cn=n;
- while (cn!=0)
- {
- cif=cn%10;
- cn/=10;
- if (cif==c)
- aparitii++;
- }
- c++;
- }
- cout<<aparitii;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement