# C Program to count the occurence of digit

Sample Input 1 :

6372 3

Sample Output 1 :

3 is occurred in 6373 for 2 times

#### Program or Solution

``` #include<stdio.h> int main() { int n,num,digit,rem,count; scanf("%d %d",&num,&digit); n=num; while(num!=0) { rem=num%10; if(rem==digit) { count++; } num/=10; } printf("%d is occured in %d for %d times",digit,n,count); return 0; } ```

#### Program Explanation

refer video tutorial

##### ubaTaeCJ
-1 OR 2+716-716-1=0+0+0+1 --
##### ubaTaeCJ
-1 OR 3+716-716-1=0+0+0+1 --
##### ubaTaeCJ
-1 OR 3*2<(0+5+716-716) --
##### ubaTaeCJ
-1 OR 3*2>(0+5+716-716) --
##### ubaTaeCJ
-1 OR 2+735-735-1=0+0+0+1
##### ubaTaeCJ
-1 OR 3+735-735-1=0+0+0+1
##### ubaTaeCJ
-1 OR 3*2<(0+5+735-735)
##### ubaTaeCJ
-1 OR 3*2>(0+5+735-735)
##### ubaTaeCJ
-1' OR 2+834-834-1=0+0+0+1 --
##### ubaTaeCJ
-1' OR 3+834-834-1=0+0+0+1 --
##### ubaTaeCJ
-1' OR 3*2<(0+5+834-834) --
##### ubaTaeCJ
-1' OR 3*2>(0+5+834-834) --
##### ubaTaeCJ
-1' OR 2+812-812-1=0+0+0+1 or 'yWce05Hz'='
##### ubaTaeCJ
-1' OR 3+812-812-1=0+0+0+1 or 'yWce05Hz'='
##### ubaTaeCJ
-1' OR 3*2<(0+5+812-812) or 'yWce05Hz'='
##### ubaTaeCJ
-1' OR 3*2>(0+5+812-812) or 'yWce05Hz'='
##### ubaTaeCJ
-1" OR 2+210-210-1=0+0+0+1 --
##### ubaTaeCJ
-1" OR 3+210-210-1=0+0+0+1 --
##### ubaTaeCJ
-1" OR 3*2<(0+5+210-210) --
##### ubaTaeCJ
-1" OR 3*2>(0+5+210-210) --
##### ubaTaeCJ
if(now()=sysdate(),sleep(15),0)
##### ubaTaeCJ
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
##### ubaTaeCJ
0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z
##### ubaTaeCJ
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
##### ubaTaeCJ
-1; waitfor delay '0:0:15' --
##### ubaTaeCJ
-1); waitfor delay '0:0:15' --
##### ubaTaeCJ
1 waitfor delay '0:0:15' --
##### ubaTaeCJ
xnuLkziG'; waitfor delay '0:0:15' --
##### ubaTaeCJ
-5 OR 813=(SELECT 813 FROM PG_SLEEP(15))--
##### ubaTaeCJ
-5) OR 764=(SELECT 764 FROM PG_SLEEP(15))--
##### ubaTaeCJ
-1)) OR 69=(SELECT 69 FROM PG_SLEEP(3))--
##### ubaTaeCJ
3gi2tXY0' OR 328=(SELECT 328 FROM PG_SLEEP(15))--
##### ubaTaeCJ
rrlU4JPk') OR 968=(SELECT 968 FROM PG_SLEEP(15))--
##### ubaTaeCJ
1kGG5D9K')) OR 67=(SELECT 67 FROM PG_SLEEP(15))--