Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.*;
- public class Countingloopsex2 {
- public static void main(String[] args) {
- int fn = 1;
- double sn = 1;
- int bp1;
- int bp2 = 1;
- double bp6 = 0;
- double bp4 = 1;
- bp1 = Integer.parseInt( JOptionPane.showInputDialog("Enter first number: " ));
- while (bp2 <= bp1 ){
- double bp3 = bp4 / (sn+1) ;
- double bp5 = bp6 + bp3;
- bp2++;
- System.out.println(bp5);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement