Computer Science, asked by vermarahulkumar, 1 year ago

WAP to calculate following expression without using pow() function .
E=x to power y

Answers

Answered by anirbanroy
1
import java.util.Scanner;
class Power
{
static void main()
{
Scanner sc=new Scanner(System.in);
int x,I,y,E=1;
System.out.println("Enter the value of x and y");
x=sc.nextInt();
y=sc.nextInt();
for(I=0;I<y;I++)
E*=x;
System.out.println(E);
}
}

Answered by sapnavijesh02
0

Explanation:

68g68g6g88g66g6g8tt68y66y8rxtytxdtyy6fuyfyffyu6fu6fu6fuf6u6t6fff6u6f6fu6ff6f6u6u6f6f6u66f66 dtdtytdytyfytfytftyty

Similar questions