Skip to content

Instantly share code, notes, and snippets.

@ishanbhavsar3
Created January 30, 2022 03:27
Show Gist options
  • Save ishanbhavsar3/cf051ba03b8d3d76c4297c0477265a99 to your computer and use it in GitHub Desktop.
Save ishanbhavsar3/cf051ba03b8d3d76c4297c0477265a99 to your computer and use it in GitHub Desktop.
SGST , CGST & IGST dependancies
import javax.swing.*;
public class GST {
JFrame f;
public void main(double b, char a, double c) {
f = new JFrame();
switch (a) {
case 'a' -> {
JOptionPane.showMessageDialog(f, "SGST = " + c + "% , CGST = " + c + "%");
JOptionPane.showMessageDialog(f, "SGST = Rs." + Math.round((((c * b) / 100))) + "\n CGST = Rs." + Math.round((((c * b) / 100))));
JOptionPane.showMessageDialog(f, "Final cost = Rs." + Math.round((b + ((2 * c * b) / 100))));
}
case 'b' -> {
JOptionPane.showMessageDialog(f, "IGST = " + c + "%");
JOptionPane.showMessageDialog(f, "Final cost = Rs." + Math.round((b + ((c * b) / 100))));
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment