#include <stdio.h> #include <conio.h> void fun(char *s) { int i, j; for (i = 0, j = 0; s[i] != '\0'; i++) if (s[i] >= '0' && s[i] <= '9') s[j++] = s[i]; s[j] = '\0'; } void main() { char item[80]; void clrscr(); printf("\nEnter a string :"); gets(item); printf("\n\nThe string is:%s\n", item); fun(item); printf("\n\nThestring of changing is:%s\n", item); }
+-----------------------+
| start |
+-----------------------+
|
+-----------------------+
| declare variables |
+-----------------------+
|
+-----------------------+
| read string |
+-----------------------+
|
+-----------------------+
| print original string |
+-----------------------+
|
+-----------------------+
| modify string |
+-----------------------+
|
+-----------------------+
| print modified string |
+-----------------------+
|
+-----------------------+
| end |
+-----------------------+