Sum
import javax.swing.JOptionPane public class Sum {public static void main (String [] args) {String primoNumero JOptionPane.showInputDialog = ("enter first number"); secondoNumero String = JOptionPane.showInputDialog ("enter second number") int a = Integer.parseInt (primoNumero); int b = Integer.parseInt (secondoNumero); int c = a + b; JOptionPane.showMessageDialog (null, "sum =" + c, "the sum of two integers, JOptionPane.PLAIN_MESSAGE);}}
_____________________________________________________________________
___________________________________________________________________________________
_____________________________________________________________________________________
0 comments:
Post a Comment