#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int n,x,y=1;
cout<<"Please enter x: ";
cin>>x;
cout<<"Please enter n: ";
cin>>n;
//Coding by: Snehil Khanor
//http://WapCPP.blogspot.com
for (int i=1;i<=n;i++)
y=y*x;
cout<<y;
getch();
}
write a java application that generate custemer account balance in a banking system?
X**y
Write a program using recursion which should take two values and display 1st value raised to the power of second value.
Not enough information. Power = current x voltage. Since voltage can be anything, there is no way to calculate power. Time is irrelevant; though once you have the power, it can help you calculate energy (energy = power x time).
In practice, it is better to use the Math class, which already has a pow() (i.e., power) function. If you want to program it yourself, just write a loop:double myPower(double x, int y){double result = 1;for (int i = 1; i
cn = c0 *( 1 + i ) pow n
Ten to the power of 12 in numbers is: 1012
write a java application that generate custemer account balance in a banking system?
Whit a calculator
X**y
Base, power, answer
I think you are referring to scientific notation in which you read numbers multiplied by ten and to the power of whatever. Example: You can write 1,000,000.0, or you can write 1.0 x 10 to the sixth power or for numbers with a value less than 1 Example: You can write 0.000001, or you can write 1.0 x 10 to the negative sixth power Either way you write it the number is the same.
You give them exponents. For example 5 becomes a power when it is 5 to the 3rd power (5^3).
Write a program using recursion which should take two values and display 1st value raised to the power of second value.
#include<iostream.h> #include<conio.h> #include<math.h> void main() { clrscr(); int m=3,n=2; int a; a=pow(m,n); cout<<a; getch(); }
To calculate this, write the number as a power of ten, and use the fact that when you raise a power to a power, you simply multiply the exponents. (10^10)100 = 10^20
You have to add the two numbers together then multiply it by 2.