Facebook
From Wjrj, 9 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 334
  1. import javax.swing.JOptionPane;
  2. //STHYFEN DELLOSA
  3. //BSIS -1D
  4. public class inchestofeet {
  5.     public static void main(String[] args){
  6.         int numberOfInches = Integer.parseInt(JOptionPane.showInputDialog("enter the number of inches: "));
  7.         int inchesToFeet = numberOfInches / 12;
  8.         int remainingInches = numberOfInches % 12;
  9.         JOptionPane.showMessageDialog(null, numberOfInches + " inches is equal to "+inchesToFeet+ " feet and "+remainingInches+" inches.");
  10.     }
  11. }
  12.  
  13. import javax.swing.JOptionPane;
  14. public class munitesToHours {
  15.     public static void main(String[] args){
  16.         int numberOfMunites = Integer.parseInt(JOptionPane.showInputDialog("enter the number of munites: "));
  17.         double minutesToHours = numberOfMunites / 60;
  18.         double hoursToDays = minutesToHours / 24;
  19.         JOptionPane.showMessageDialog(null, numberOfMunites + " munites is equal to "+minutesToHours+ " hours and equals to "+hoursToDays+" Days.");
  20.     }
  21. }