Skip to main content

[JAVA] Try For Big

Write a program to solve the following to get result 97-

a)  x raise to power y where x=14 and y=187 and store it in z.
b)  z mod 319

*hint to do program is given in the post.

Comments

  1. import java.io.*;

    class por
    {
    public static void main(String[] args)throws IOException
    {
    double x,y,z;
    x=14;
    z=1;
    for(y=0;y<187;y++)
    {
    z=z*x;
    }
    System.out.println(z);
    z=z%319;
    System.out.println(z);
    }

    ReplyDelete

Post a Comment

Popular posts from this blog