Write A C++ Program To Print INDIA Pattern As Given Below
II NI N DI N D II N D I A
#include<iostream> using namespace std; int main() { char s[]="INDIA"; int i,j; for(i=0;s[i];i++) { for(j=0;j<=i;j++) cout<<s[j]; cout<<"\n"; } return 0; }
Output:
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Output:
I
need an explanation for this answer? contact us directly to get an explanation for this answerI N
I N D
I N D I
I N D I A