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";
return 0;
}
/*
* OUTPUT
C
C+
C++
C++
C++ P
C++ Pr
C++ Pro
C++ Prog
C++ Progr
C++ Progra
C++ Program
C++ Programm
C++ Programmi
C++ Programmin
C++ Programming
C++ Programming
C++ Programming W
C++ Programming Wi
C++ Programming Wit
C++ Programming With
C++ Programming With
C++ Programming With P
C++ Programming With Pa
C++ Programming With Par
C++ Programming With Para
C++ Programming With Paraz
C++ Programming With Parazh
C++ Programming With Parazha
C++ Programming With Parazhar
*/
// 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";
return 0;
}
/*
* OUTPUT
C
C+
C++
C++
C++ P
C++ Pr
C++ Pro
C++ Prog
C++ Progr
C++ Progra
C++ Program
C++ Programm
C++ Programmi
C++ Programmin
C++ Programming
C++ Programming
C++ Programming W
C++ Programming Wi
C++ Programming Wit
C++ Programming With
C++ Programming With
C++ Programming With P
C++ Programming With Pa
C++ Programming With Par
C++ Programming With Para
C++ Programming With Paraz
C++ Programming With Parazh
C++ Programming With Parazha
C++ Programming With Parazhar
*/
Comments
Post a Comment