![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 27.06.2020 09:01 tonya3498
There is an application which inputs hundred numbers from the user, if user enters a positive number it increments valid numbers count. But if a user enters other than integer it terminates. You are required to make changes in given code such that instead of termination it shows message “input is not valid” and re input a number.
importjavax. swing.*;
publicclass QuestionNumber4 {
publicstaticvoidmain(String[] args) {
intcountValidNumber=0;
int num;
for(inti=0;i<100;i++){
System. out. print("Enter a Positive Number:");
String s1 =JOptionPane. showInputDialoge(“enter number”,null);
num = Integer. parseInt(s1);
if(num>0){
countValidNumber++;
}
}
System. out. println("Valid Numbers Are:"+countValidNumber);
}
![ansver](/tpl/images/cats/User.png)
Answers: 2
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 02:30
If you turn on the lock alpha button , what happens
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 10:00
According to alisa miller foreign news bureaus
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 15:50
The file sales data.xlsx contains monthly sales amounts for 40 sales regions. write a sub that uses a for loop to color the interior of every other row (rows 3, 5, etc.) gray. color only the data area, columns a to m. (check the file colors in excel.xlsm to find a nice color of gray.)
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 16:30
Corey set up his presentation for delivery to his team.the information he had to convey was critical to their job performance.he knew he would need a lot of time to explain each point
Answers: 3
You know the right answer?
There is an application which inputs hundred numbers from the user, if user enters a positive number...
Questions
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 04.03.2021 07:30
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 04.03.2021 07:30
![question](/tpl/images/cats/health.png)
Health, 04.03.2021 07:30
![question](/tpl/images/cats/mat.png)
Mathematics, 04.03.2021 07:30
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 04.03.2021 07:30
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mkx.png)
Arts, 04.03.2021 07:30
![question](/tpl/images/cats/mat.png)
Mathematics, 04.03.2021 07:30
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mkx.png)
Arts, 04.03.2021 07:30
![question](/tpl/images/cats/mat.png)
Mathematics, 04.03.2021 07:30
![question](/tpl/images/cats/mat.png)
Mathematics, 04.03.2021 07:30
![question](/tpl/images/cats/himiya.png)
Chemistry, 04.03.2021 07:30
![question](/tpl/images/cats/health.png)
Health, 04.03.2021 07:30