#Assignment help
10 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @edgy hinge! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
post instead of telling us about it
Ok
Was busy
Assignment; Design an algorithm and its Java code that displays what numbers are multiple of 7
in a given range (lower bound is inclusive, upper is exclusive) as well as the total of numbers found
to be multiple of 7. In addition, request the user to enter the result of multiplying the lower bound
times upper bound in the mentioned given range, repeat this action until the user enters the correct
value.
Expected output: Your program should output to the screen the following text.
Numbers that are multiple of 7, how many numbers are multiple of 7 AND
Enter the value of multiplying the lower and upper bound.
import java.util.Scanner;
public class Lab4 {
public static void main(String[] args){
Scanner keyboard = new Scanner(System.in);
int count = 0;
int LowerBound;
int UpperBound;
int CombinedBounds;
LowerBound = keyboard.nextInt();
UpperBound = keyboard.nextInt();
CombinedBounds = keyboard.nextInt();
for (int i = LowerBound; i < UpperBound; i ++){
if ( i % 7 == 0) {
System.out.println(i);
count+=1;
}
}
System.out.println("The total found: " + count);
System.out.println("enter the value of multiplying the lower and upper bound: " + CombinedBounds);
}
}```
I think you're not checking whether "combinedBounds" is correct
please format your code, #❗︱how-to-get-help #6
How am I supposed to go about checking that?