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.
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.
import java.io.*;
ReplyDeleteclass 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);
}
question wali line padho answer 97 lana hai
Delete