blob: 55dde95d66236058c6421bdca6943e480e7d2ae8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
import javax.swing.*;
class Programa03
{
public static void main (String args[])
{
int n1, n2, mod;
double raiz1, raiz2;
String msg = "";
n1 = Integer.parseInt(JOptionPane.showInputDialog("Numero 1:"));
n2 = Integer.parseInt(JOptionPane.showInputDialog("Numero 2:"));
mod = n1 % n2;
raiz1 = Math.sqrt(n1);
raiz2 = Math.sqrt(n2);
msg = msg + "remainder: " + mod + "\n";
msg = msg + "Square n1: " + raiz1 + "\n";
msg = msg + "Square n2; " + raiz2 + "\n";
JOptionPane.showMessageDialog(null, msg);
System.exit(0);
}
}
|