Skip to content

Commit

Permalink
Uploaded By Srijan
Browse files Browse the repository at this point in the history
  • Loading branch information
SrijanSahaySrivastava committed Nov 17, 2022
1 parent 980c573 commit 467f868
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions srijan.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include<stdio.h>

int main(){
int n,a,b;
scanf("%d", &n);
int copy1=n;
int copy2=n;
while(n!=0){
int c=0;
a=n%10;
while(copy1!=0){
b=copy1%10;
if(a==b) c++;
copy1=copy1/10;
}
n=n/10;
copy1=copy2;
printf("%d is repeated %d times\n", a,c);
}
}

0 comments on commit 467f868

Please sign in to comment.