Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to print India by nested loop?
I
IN
IND
INDI
INDIA

Answer Posted / rashi

class Find{
public static void main (String args[])
{
String s="India";
int i,j;
l=s.length();
for(i=0;i<l;i++)
{
for (j=0;j<=i;j++)
{
char ch=S.charAt(i);
System.out.print(ch);
}
System.out.println(" ");
}
}
}

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are pointers? What are stacks and queues?

1063


Are the outer parentheses in return statements really optional?

1049


What is c language & why it is used?

1030


Are pointers integers in c?

1028


Write a program to find factorial of a number using recursive function.

1065


Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.

1045


Write a program to check palindrome number in c programming?

962


Is exit(status) truly equivalent to returning the same status from main?

1008


Difference between exit() and _exit() function?

1076


difference between Low, Middle, High Level languages in c ?

2024


Why do we use null pointer?

997


the question is that what you have been doing all these periods (one year gap)

2017


Why header file is used in c?

1023


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc

5555


When is the “void” keyword used in a function?

1428