From 467f8689e5e382061b2aed7c85165d1ff7829e88 Mon Sep 17 00:00:00 2001 From: SrijanSahaySrivastava Date: Thu, 17 Nov 2022 17:45:41 +0530 Subject: [PATCH] Uploaded By Srijan --- srijan.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 srijan.c diff --git a/srijan.c b/srijan.c new file mode 100755 index 0000000..a79679c --- /dev/null +++ b/srijan.c @@ -0,0 +1,20 @@ +#include + +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); + } +} \ No newline at end of file