This blog consists of C and C++ programs. C and C++ programming is the basics to learn any programming language. Most of the programs are provided with their respective outputs. This blog also contains Data Structures programs using Object-Oriented Programming (C++). Some of the best books for learning C and C++ programming are also mentioned.

Tuesday 2 July 2013

Program to print the String pattern 1

#include<iostream.h>
#include<conio.h>
#include<string.h>
void main()
{
clrscr();
char str[100];
int i;
cout<<"Enter the string:";
cin>>str;
for(i=0;i<=strlen(str);i++)
{
cout.write(str,i);
cout<<"\n";
}
getch();
}


1 comment: