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
to find the closest pair
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
‘SAVEPOINT’ and ‘ROLLBACK’ is used in oracle database to secure the data comment. Give suitable examples of each with sql command.
Write the syntax and purpose of a switch statement in C.
What are the key features in c programming language?
Where are the auto variables stored?
pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)
What is the auto keyword good for?
What are the features of the c language?
What is the difference between malloc() and calloc() function in c language?
What is the modulus operator?
What is the difference between int main and void main?
Is there a built-in function in C that can be used for sorting data?
Is c still used?
What is the difference between %d and %i?