#include<stdio.h>
#include<conio.h>
#include<string.h>
main()
{
int i;
int numbers=0;
char str[200];
clrscr();
printf("Enter string: ");
gets(str);
for(i=0;i<=strlen(str);i++)
{
if((str[i]>='0')&&(str[i]<='9'))
{
numbers++;
}
}
printf("\ntotal numbers in this string is %d",numbers);
getch();
}
#include<conio.h>
#include<string.h>
main()
{
int i;
int numbers=0;
char str[200];
clrscr();
printf("Enter string: ");
gets(str);
for(i=0;i<=strlen(str);i++)
{
if((str[i]>='0')&&(str[i]<='9'))
{
numbers++;
}
}
printf("\ntotal numbers in this string is %d",numbers);
getch();
}