Answer:
while (Num>=0) {
System.out.println("enter a another number");
Num = in.nextInt();
}
Explanation:
The complete java code prompting a user to enter a number until a negative number is entered is given below:
import java.util.Scanner;
public class num6 {
public static void main (String [] args) {
Scanner in = new Scanner(System.in);
System.out.println("enter a number");
int Num = in.nextInt();
while (Num>=0) {
System.out.println("enter a another number");
Num = in.nextInt();
}
System.out.println("Done.");
return;
}
}
Answer:
<u>note:</u>
<em><u>solution is attached in word form due to error in mathematical equation. furthermore i also attach Screenshot of solution in word due to different version of MS Office please find the attachment</u></em>
Answer:
Check the explanation
Explanation:
# Step 1
the first thing to execute will be......
f = open("states.txt")
# Step 2
the second step is......
states = []
for line in f:
states.append(line.strip())
# Step 3:
the third step is to......
for state in sorted(states):
print(state)
f.close()
Answer:
the answer is d have a nice day
Explanation: i got a 100
Answer:
computer is used to create a voucher document