import javax.swing.*;
public class JMaths
{
public static void main(String[] args)
{
String Along;
String OfWords;
Double Agent;
Double Entry;
Along = JOptionPane.showInputDialog("Give me a number");
Agent = Double.parseDouble(Along) * 1.00;
Entry = Math.sin ( Math.toRadians(Agent) );
JOptionPane.showMessageDialog(null,"Sin of Entry = " + Entry);
JOptionPane.showMessageDialog(null,"Cosecant of Entry = " + (1/Entry));
Entry = Math.cos ( Math.toRadians(Agent) );
JOptionPane.showMessageDialog(null,"Cos of Entry = " + Entry);
JOptionPane.showMessageDialog(null,"Secant of Entry = " + (1/Entry));
Entry = Math.tan ( Math.toRadians(Agent) );
JOptionPane.showMessageDialog(null,"Tan of Entry = " + Entry);
JOptionPane.showMessageDialog(null,"Cotangent of Entry = " + (1/Entry));
Entry = Math.pow(Agent,2);
JOptionPane.showMessageDialog(null,"Entry to the second power = " + Entry);
Entry = Math.sqrt(Agent);
JOptionPane.showMessageDialog(null,"The square root of the entry = " + Entry);
OfWords = JOptionPane.showInputDialog("Give me a sentence");
JOptionPane.showMessageDialog(null,"Value at charAt(2) = " + OfWords.charAt(2) );
JOptionPane.showMessageDialog(null,"Value at charAt(2,5) = " + OfWords.charAt(2,5) );
JOptionPane.showMessageDialog(null,"Value at substring(2) = " + OfWords.substring(1) );
JOptionPane.showMessageDialog(null,"Value at substring(2,5) = " + OfWords.substring(1,5) );
JOptionPane.showMessageDialog(null,"Value at indexOf('2') = " + OfWords.indexOf('2') );
JOptionPane.showMessageDialog(null,"Value at indexOf('2',5) = " + OfWords.indexOf('2',5) );
}
}