Showing posts with label string fashion example. Show all posts
Showing posts with label string fashion example. Show all posts

12.02.2011

String Triangle

Q. Write a program to display the string INDIA in the following fashion:

I
IN
IND
INDI
INDIA
INDIA
INDI
IND
IN
I

Ans.

/*program to display the string as given fashion*/
#include<stdio.h>
#include<conio.h>
int main()
{