Respuesta :
Answer:
#include <iostream>
using namespace std;
int main()
{
int userInput = 0;
do {
cout << "Enter a number (<100):" << endl;
cin >> userInput;
}
while(userInput >= 100);
cout << "Your number < 100 is: " << userInput << endl;
return 0;
}
Explanation:
Inside the do part, ask user to enter a number and get that number.
In the while, check if the number is greater than or equal to 100. It is going to keep asking to enter a number until a number that is smaller than 100 is entered.
Print out the number that is smaller than 100.
Answer:
import java.util.Scanner;
public class NumberPrompt {
public static void main (String [] args) {
Scanner scnr = new Scanner(System.in);
int userInput = 0;
do {
System.out.println("Enter a number (<100):");
userInput = scnr.nextInt();
}
while(userInput >= 100);
System.out.println("Your number < 100 is: " +userInput);
}
}
Explanation:
Answer in java