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
What is omp_num_threads?
Are the variables argc and argv are always local to main?
When should the volatile modifier be used?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
Define VARIABLE?
In which layer of the network datastructure format change is done
What is the benefit of using #define to declare a constant?
What is the modulus operator?
What does 3 periods mean in texting?
What are the scope of static variables?
What is c standard library?
Write a program to print fibonacci series without using recursion?
Why is sprintf unsafe?
What is a macro in c preprocessor?
`write a program to display the recomended action depends on a color of trafic light using nested if statments