#include
#include
#define n 100
void del_char(char str1[n],char str2[])
{
char str[n],*p1,*q,i,j;
p1=str1;
q=str;
*q=*p1;
i=0;
while(*p1!='\0')
{
{
if(*p1==str2[i])
{
p1++;
i++;
if(*p1==str2[i])
{
p1++;
i++;
if(*p1==str2[i])
{
p1++;
i++;
}
else
{
q++;
}
}
else
{
q++;
}
}
else
{
p1++;
q++;
}
*q=*p1;
}
i=0;
}
printf("%s\n",str);
}
main()
{
char str1[n],str2[]={"to "};
clrscr();
printf("please enter a text and includ 'to':\n");
gets(str1);
printf("remove 'to',remaining :\n");
del_char(str1,str2);
getch();
return 0;
}
Output:
please enter a text and includ 'the':
Write a c program to simulate the calculator using function
remove 'the',remaining :
Write a c program to simulate calculator using function
Write a program in c++ that take input in a integer matrix of size 4*4 and find out if the entered matrix is diagonal or not.
You do nothing! A sequence of numbers will contain no X and so nothing needs doing!
{char a;...cout > a;cout
{Area s the area of cube} {Length is the length of one side of the cube} program AreaofCube; var Area,Length:real; begin write('Enter the length of cube: '); readln(Length); Area:=6*(Length*Length); writeln('The area of cube is ', Area, ' cm^2.'); end.
How to write a program for secant method by mathematica
Write a program in c++ that take input in a integer matrix of size 4*4 and find out if the entered matrix is diagonal or not.
You do nothing! A sequence of numbers will contain no X and so nothing needs doing!
{char a;...cout > a;cout
Yes and no, program development works in programming codes which are specifically made for humans to be entered, a program can write these programming codes too. The thing is, you would need to write the programming codes yourself before the program can use it in program development. If a program could invent the wheel, then you still need to invent that wheel before the program can. Or atleast until the thinking of the human brain can be translated into mere programming code.
unsigned find (const char* str, char c) { unsigned total; total = 0; if (str!=NULL) while (*str) { if (*str++==c) ++total; } return total; }
there could be a part in it like this: int num, digit; int count [10]; do { digit = num%10; num != 10; ++count[digit]; } while (num);
{Area s the area of cube} {Length is the length of one side of the cube} program AreaofCube; var Area,Length:real; begin write('Enter the length of cube: '); readln(Length); Area:=6*(Length*Length); writeln('The area of cube is ', Area, ' cm^2.'); end.
How to write a program for secant method by mathematica
write a vb program to find the magic square
write a program to multily 3*3 matrix.
write a lex program to delete space from the program
It depends what programming language you want to use. A simple BASIC program would be... 10 INPUT x 20 IF x>0 THEN GOTO 40 30 END 40 PRINT x 50 GOTO 10