write program
s=1x3x5x...........x17
import java.math.*; class NumberExample { public static void main(String[] args) { BigInteger p=new BigInteger("1"); int m=0; for(int i=1; i<=17; i+=2){ BigInteger n = BigInteger.valueOf(i); p=p.multiply(n); System.out.print(i+" "); } System.out.println(); System.out.println(p); } }
Ads