May 11, 2011
//Downloaded From theonlinetutorials.com //Source code #include<iostream.h> #include<stdio.h> #include<string.h> #include<conio.h> #define size 100 unsigned short int checksum(char []); void valch(unsigned short int check,char message[]); int main(){ clrscr(); cout<<” Enter any thing :”; char message[size]={0}; cin>>message; unsigned short int check=checksum(message); getch(); valch(check,message); getch(); return 0; } void valch(unsigned short int check,char message[]){ unsigned short int t[size],ch=0; int [...]
Read the full article →
May 11, 2011
//Downloaded From theonlinetutorials.com //Source code #include<iostream.h> #include<conio.h> #include<stdio.h> #include<string.h> void dop(char s[]) { char a[100],b[100]; a[0]=NULL; b[0]=NULL; int flag=0,sa=0; for(int i=0;i<=strlen(s);i++) { if(s[i]==’ ‘||s[i]==NULL) { b[sa]=’ ‘; sa++; b[sa]=NULL; flag=1; } else { b[sa]=s[i]; sa++; } if(flag==1) { if(strcmp(a,b)==0) { for(int j=(i-sa);j<=strlen(s);j++) { s[j]=s[j+sa]; } i=i-sa; } flag=0; sa=0; strcpy(a,b); } } } int main() [...]
Read the full article →