I
IN
IND
INDI
INDIA
Complete the program using java language
garywalter1221:
same question I also asked but in C language
Answers
Answered by
1
Input
- #include<stdio.h>
- void main()
- {
- int x,y;
- char str[]="INDIA";
- for(x=0 ; x<5 ; x++)
- {
- y=x+1;
- printf("%-5.*s\n",y,str);
- }
- for(x=4; x>=0; x--)
- {
- y=x+1;
- printf("%-5.*s\n",y,str);
- }
- }
Hope this will work...
The output will be:
I
IN
IND
INDI
INDIA
INDIA
INDI
IND
IN
I
Similar questions