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
Explain what is a 'locale'?
what is the difference between 123 and 0123 in c?
What are the disadvantages of a shell structure?
What oops means?
What does a pointer variable always consist of?
Explain what is the difference between #include and #include 'file' ?
What is self-referential structure in c programming?
write a program to generate address labels using structures?
Explain heap and queue.
Write a program to swap two numbers without using third variable?
What are loops c?
What is malloc return c?
What is the -> in c?
how to find anagram without using string functions using only loops in c programming
How do you declare a variable that will hold string values?