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 the difference between null pointer and wild pointer?
What is define directive?
What's the right way to use errno?
What is scope of variable in c?
how to capitalise first letter of each word in a given string?
Who is the founder of c language?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
what is recursion in C
What is the size of a union variable?
Explain what is the general form of a c program?
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
What are unions in c?
Explain what are the advantages and disadvantages of a heap?
I need testPalindrome and removeSpace
#include