subject
English, 21.04.2020 19:25 Tboogie2037

Write a Java program to do the following:-
1- Write a method void Print(int LastNumber, int numbersPerLine) that receives two integers lastnumber and numbersPerLine. The program should print all the numbers from 1 to lastnumber, numbersperline each line. The last line should contain the remaining numbers.

Ex: if lastNumber=13 and numbersPerLine=5 Ex:if lstNumber=21 and numbersPerLine=5 Output should be: Output should be 1 2 3 4 5 1 2 3 4 5 6 7 8 9 10 6 7 8 9 10 11 12 13 11 12 13 14 15 16 17 18 19 20 21

2- Write a method called Multi(int n1,int n2) that receives two integers n1 and n2, the method should print all the numbers that result from multiplying all numbers from 1 to n1 by all numbers from 1 to n2. Ex: if n1=6 and n2=7, the output would be as follows: 1 2 3 4 5 6 7 2 4 6 8 10 12 14 3 9 … .. .. 6 12 18 24 30 36 42

3- Test your Program by invoking all methods

ansver
Answers: 3

Another question on English

question
English, 21.06.2019 18:30
Finish these lyrics cuz im bored lol " said i wouldnt die yeah" "no, im not alright yeah"
Answers: 1
question
English, 21.06.2019 22:00
On one hand, i aspire to an ivy league vocation: 1 professor of the sciences in higher education. 2 but like noble amphibians that thrive on land and in the stream, 3 i've got another world of which i like to gladly dream. 4 some say that it's abnormal; my affections are exclusive. 5 in science, they say, emotions are something quite elusive. 6 line 3 exemplifies which kind of figurative language? a) hyperbole b) metaphor c) onomatopoeia d) simile
Answers: 3
question
English, 22.06.2019 08:00
What inferences can be made about odysseus based on his choice to stay and see the cyclops?
Answers: 3
question
English, 22.06.2019 09:30
Ineed a completely original alliteration poem, !
Answers: 1
You know the right answer?
Write a Java program to do the following:-
1- Write a method void Print(int LastNumber, int n...
Questions
question
World Languages, 07.01.2021 19:20
question
Mathematics, 07.01.2021 19:20
question
Health, 07.01.2021 19:20
question
Physics, 07.01.2021 19:20
question
Mathematics, 07.01.2021 19:20
question
Chemistry, 07.01.2021 19:20
question
Mathematics, 07.01.2021 19:20
question
Arts, 07.01.2021 19:20
question
Mathematics, 07.01.2021 19:20
Questions on the website: 13722367