// easier program for pascal's triangle import java.util.*; class Pascal_Triangle { /** * 1 * 1 1 * 1 2 1 * 1 3 3 1 * 1 4 6 4 1 */ public static void main(String args[])throws InputMismatchException { Scanner sc = new Scanner(System.in); System.out.println("Enter n : "); int n = sc.nextInt(); int spaces = n; int i,j,k; long store; for(i=0;i<n;i++) { for(j=spaces;j>=1;j--) { System.out.print(" "); } spaces--; store = (long)Math.pow(11,i); long num = store; while(num!=0) { System.out.print((num%10) + " "); num = num/10; } System.out.println(); } } } |
|
asked by Sdfg Sdfg (sdfg) 7 years ago | |
2 |
Can anyone upload or send the link of the Must known Computer Applications questions for 2016-17 of Chatrabhuj Narsee Monjee School(CNM School),Mumbai. |
|
asked by Samruddha Somani (samu30) 7 years ago | |
0 | |
Plasma protein that constitutes antibodies? |
|
asked by Ronaldo (techtoicsaf) 7 years ago | |
1 |
Many students are preparing very hard. .But on revising the past 10 years Question did anyone find any difficulty.Then Pls Thumbs up if not then thumbs down. |
|
asked by Funny Funny (funnysimgh) 7 years ago | |
1 |
how is marking of precis done in gramme.????? Can we get full mks in it...wut is highest marks in letter and essay? Is punctuation important in letter address>? |
|
asked by Jai Veer Pratap Atomic no. 83 (jai_veer_pratap) 7 years ago | |
1 |
Guys, how many hours are you studying per day? |
|
asked by An On (anon) 7 years ago | |
4 | |
diff between agro forestry and socio-forestry |
|
asked by Prv1 (prv1) 7 years ago | |
2 |
Please show the isomers of pentane..... |
|
asked by . (myself1002) 7 years ago | |
3 |
राम गेन्द से खेलता है। ( change the voice) |
|
asked by Varna Sajee (varnzkatz) 7 years ago | |
2 | |
I need 1984 and 1985 geo question papers |
|
asked by HarryPotter10 (harrypotter10) 7 years ago | |
2 |
Page 52 |
ICSE chat