print the pattern 1
2 4
3 6 9
4 8 12 16
5 10 15 20 25
if n=5
Answer Posted / murthyknm
public class Pattern
{
public static void main(String args[])
{
for(int i=1;i<=5;i++)
{
for(int j=1;j<=i;j++)
{
System.out.print(i*j+" ");
}
System.out.println();
}
}
}
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Why is c called "mother" language?
Does c have circular shift operators?
Explain argument and its types.
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
Why we use int main and void main?
Do you know null pointer?
State the difference between realloc and free.
What is console in c language?
What is structure and union in c?
What are the valid places to have keyword “break”?
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
What are linked lists in c?
What is the use of c language in real life?
write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?