代码

File EditViewSearch Terminal Help

#define MAX a,b (a>b?a:b)

#include “stdio.h”

#include “string.h”

int main()

char string[100];

scanf ("%s" , string);

inti=0,flag=0;

int len = strlen(string);int max = 0;

while(i < len)

if( string[i]»=‘0’ &&string[i]<=‘9’)f

flag++;

i++;

]

else

[

max = MAX(max, flag);

flag = 0;

i++;

]

]

printf ("%d" ,max);

你可能感兴趣的:(嵌入式Linux)