12344321
123 321
12 21
1 1 how i print this program??
Answer Posted / harika
package basic_java_examples;
public class Numbers {
public static void main(String[] args){
int i,j,n=4;
for(i=0;i<=n;i++){
System.out.println();
for(j=1;j<=n-i;j++)
System.out.print(j);
for(j=0;j<2*i;j++)
System.out.print(" ");
for(j=n-i;j>=1;j--)
System.out.print(j);
}
}
}
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Difference between linking and loading?
a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if
write a c program to calculate sum of digits till it reduces to a single digit using recursion
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
The difference between printf and fprintf is ?
What is self-referential structure in c programming?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
What is data structure in c programming?
How do I read the arrow keys? What about function keys?
What is memory leak in c?
Write a program to use switch statement.
Do you have any idea how to compare array with pointer in c?
What is the difference between printf and scanf )?
What is void main ()?