Posts

Showing posts with the label program string

JAVA: String to Star pattern

Click here to View PS: my friend asked me to do this program and i have just proved that my l0gic was right! i haven't added the all the alphabets as it was time consuming but a string like F###-OFF does work! :P

GENERAL:String

//============================================================================ // Name        : pi.cpp // Author      : Rohit More //============================================================================ #include <iostream> #include <string.h> using namespace std; int main() {     char * string2="C++ Programming With Parazhar";     int n = strlen(string2);     for(int i=1;i<n;i++)     {         cout.write(string2,i);         cout<<"\n";     }     for(int i=n;i>n;i++)     {         cout.write(string2,i);         cout<<"\n";     }     cout.write(string2,n);     cout<<"\n";     re...