Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C Compiler.
- Code, Compile, Run and Debug C program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- #include <stdio.h>
- #include <string.h>
- int main()
- {
- char str[100];
- int symbol[10]={0,1,2,3,4,5,6,7,8,9};
- int chisla=0;
- int i,j=0;
- printf("Дана строка: ");
- scanf("%s",&str);
- while(i<strlen(str))
- {
- if(str>0,str<9)
- chisla=chisla+1;
- i++;
- }
- printf ("Длина строки <<%s>> - %d символов\n“", str, strlen(str) );
- printf("Наибольшая последовательность из чисел в строке: %d",chisla);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement