Дано предложение. Удалить из него все буквы <с>.


//Дано предложение. Удалить из него все буквы <с>.

#include
#include
#include
void main()
{
clrscr();
int i=0,p=0,n=0,dlina=0;
char str[100];
str[0]=NULL;
printf(«Введи строку: «);
gets(str);
for(i=0;str[i]!=NULL;i++)
if(str[i]==’c’)
{ for(p=i;p<98;p++) str[p]=str[p+1]; i--; } printf("\n"); printf("%s\n",str); getch(); }

Загрузка...