Guest User

Untitled

a guest
Jan 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. import javax.swing.JOptionPane;
  2.  
  3.  
  4. public class SumNint {
  5. public static void main (String [] args);
  6.  
  7. string num = JOptionPane.showInputDialog("Quanti sono i numeri?");
  8. int i = 1;
  9. int sum = 0;
  10. int val = Integer.parseInt(num);
  11.  
  12. if (i < val){
  13. i = i + sum;
  14. } else {
  15. JOptionPane.showConfirmDialog(null, somma);
  16. }
  17. }
Add Comment
Please, Sign In to add comment