Somma
import javax.swing.JOptionPane;public class Somma{ public static void main(String[] args){ String primoNumero=JOptionPane.showInputDialog("digita il primo numero"); String secondoNumero=JOptionPane.showInputDialog("digita il secondo numero");  int a=Integer.parseInt(primoNumero);  int b=Integer.parseInt(secondoNumero);  int c=a+b;  JOptionPane.showMessageDialog(null, "somma= " + c, "somma di due interi", JOptionPane.PLAIN_MESSAGE); }}
_____________________________________________________________________
___________________________________________________________________________________

 Quickpost this image to Myspace, Digg, Facebook, and others!
 Quickpost this image to Myspace, Digg, Facebook, and others!
_____________________________________________________________________________________

 Quickpost this image to Myspace, Digg, Facebook, and others!
 Quickpost this image to Myspace, Digg, Facebook, and others!
 www.ImageShack.us
www.ImageShack.us 
1 commento:
Bene
Posta un commento