Find the smallest number using while loop in java 2011View more random threads:
- Students should share php and mysql knowledge with each...
- Converting HTML to Excel in php 2011
- what is factorial language?
- Progroming compition and challenges in pakistan 2011
- Upload Variables not getting passed in php 2011
- php&mysql urdu turtorial for Urdu speaking distance...
- Variables in function names in php 2011
- php and mysql lectures online in Pakistan for free 2011
- how can Animate your images in PHP 2011-12
- Banner Exchange PHP PHP SCRIPTS
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); } }
Sponsored Links
There are currently 1 users browsing this thread. (0 members and 1 guests)