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
Is it better to use malloc() or calloc()?
How can you increase the size of a statically allocated array?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
List some basic data types in c?
what is the function of pragma directive in c?
Is register a keyword in c?
Why is c known as a mother language?
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
What is a substring in c?
will u please send me the placement papers to my mail???????????????????
What are static variables in c?
Why #include is used in c language?
What does the && operator do in a program code?
What is the correct declaration of main?
Array is an lvalue or not?