Find the smallest number using while loop in java 2011View more random threads:
- Progroming compition and challenges in pakistan 2011
- PHP with Javascript in cron 2011
- Php Transaction 2011
- Find the smallest number using while loop in java 2011
- Variables in function names in php 2011
- what is factorial language?
- what are the latest updates for Mysql May 2011
- php lectures in urdu of Virtual University of Pakistan 2012
- Difference between mysql and mysqli 2011
- Cookies between too linked files in php 2011
Sponsored Links
Code:import javax.swing.*; public class HighestNum { public static void main (String args[]) { int value = 0,number=0,smallest = 0; while (value<10) { value++; number = Integer.parseInt(JOptionPane.showInputDialog("Enter a number "+value+":")); } if (number <= smallest) smallest=number; else smallest = smallest; String msg="The smallest number is :"+smallest; JOptionPane.showMessageDialog(null,msg); } }
There are currently 1 users browsing this thread. (0 members and 1 guests)