12344321
123 321
12 21
1 1 how i print this program??
Answer Posted / guest
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 ? | 16 Yes | 3 No |
Post New Answer View All Answers
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
How are variables declared in c?
How do you view the path?
What is break statement?
How can I pad a string to a known length?
Why void main is used in c?
What the advantages of using Unions?
What is string length in c?
What are the 5 data types?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
What is pointer & why it is used?
How to set file pointer to beginning c?
What does struct node * mean?
Is c compiled or interpreted?
Write program to remove duplicate in an array?