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
Do you know the difference between malloc() and calloc() function?
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
Explain how can I make sure that my program is the only one accessing a file?
What is the most efficient way to count the number of bits which are set in an integer?
What are near, far and huge pointers?
Differentiate between static and dynamic modeling.
Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant
What is static volatile in c?
What is the difference between the expression “++a” and “a++”?
In a byte, what is the maximum decimal number that you can accommodate?
What is the use of linkage in c language?
Tell me can the size of an array be declared at runtime?
List out few of the applications that make use of Multilinked Structures?
How can you check to see whether a symbol is defined?
What is s in c?