write a program to print the following series in java plz urgent
Attachments:
Answers
Answered by
1
- // Java program to print
- // Floyd's triangle
- class Test
- {
- static void printFloydTriangle(int n)
- {
- int i, j, val = 1;
- for (i=1; i<=n; i++)
- {
- for (j=1; j<=i; j++){
- System.out.print(val+" ");
- val++;
- }
- System.out.println();
- }
- }
- // Driver method
- public static void main(String[] args)
- {
- printFloydTriangle(5);
- }
- }
I hope this helps you and please mark it as Brainliest Answer..
Similar questions
English,
7 months ago
English,
7 months ago
Math,
7 months ago
Environmental Sciences,
1 year ago
Math,
1 year ago