This code is error free but have a one warning and you doesnot get this code on google in c note it krishna's words
implement NFA over E={0,1} accepting the set of all strings that was binary integer, is divisible by 5. Eg. L={0,10011, 1001100,…} in c
Algorithm
-
Start of the program
-
Initialize variable for input and states in[100] and state;
-
Create a function tranFun() which takes a bit of input and current state as parameters and returns the transited state.
-
Run a loop which passes bits of input and current state to the function tranFun() Store the intermediate transition state into variable temp and replace the value of state by latest transition state
-
If the state is in accepting state then accept the string else reject the string.
-
End of program.
strlen( ) function counts the number of characters in a given string and returns the integer value. It stops counting the character when null character is found. Because, null character indicates the end of the string in C.
- Krishna kakade - krishnadevz
Def the person who says he is programmer he takes code from one site resolved its bugs and convert it into another programming language that is called as programmer.