Find the Largest of 3 Numbers using Swings Concept

Find the Largest of 3 Numbers using Swings Concept

import javax.swing.JOptionPane;
import java.io.*;
class large
{
public static void main(String[] args) throws IOException
{

int a=Integer.parseInt(JOptionPane.showInputDialog(“enter A value”));
int b=Integer.parseInt(JOptionPane.showInputDialog(“enter Bvalue”));
int c=Integer.parseInt(JOptionPane.showInputDialog(“enter C value”));
//int a=Integer.parseInt(A);
//int b=Integer.parseInt(B);
if(a>b&&a>c)
{

JOptionPane.showMessageDialog(null,”largest value”,”message”,JOptionPane.INFORMATION_MESSAGE);
System.out.println(“largest value:”+a);
}
else if(b>c)
{
JOptionPane.showMessageDialog(null,”largest value”,”message”,JOptionPane.INFORMATION_MESSAGE);
System.out.println(“largest value:”+b);
}
else
{
JOptionPane.showMessageDialog(null,”largest value”,”message”,JOptionPane.INFORMATION_MESSAGE);
System.out.println(“largest value:”+c);
}
}
}

2 thoughts on “Find the Largest of 3 Numbers using Swings Concept

  • June 4, 2016 at 7:53 am
    Permalink

    super, excellent, good, nice, very good, superb, outstanding, magnificent, exceptional, marvellous, wonderful, sublime, perfect, eminent, matchless, peerless, supreme, first-class blog

Leave a Reply