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...

Tell me the programme for this


@
1 2
@ @ @
1 2 3 4

Answer Posted / sachin

package abc;

public class Sachin {

int n=4;
public static void main(String... args){
Sachin s=new Sachin();
for (int i=0;i<s.n;i++){
if(i%2==0){
for(int a=0; a<i+1;a++){
System.out.print("@");
}
}else{
for(int a=0; a<i+1;a++){
System.out.print(a+1);
}
}
System.out.println();
}
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do bitwise operators do?

954


What is stringjoiner ?

915


What is the main use of java?

1102


What is OOP's Terms with explanation?

1127


Can list contain null in java?

1034


What happens when a thrown exception is not handled?

1053


Why do we need hashset in java?

991


What is the importance of main method in Java?

1018


What all access modifiers are allowed for top class ?

1142


What is string :: npos?

1004


What is a substring of a string?

1088


Why main() method is public, static and void in java ?

1034


what is a working thread? : Java thread

995


What are the principle concepts of oops?

909


How to compare strings in java?

922