0

Find the error

#include<iostream.h> void main() { int x,n,z; cout<<"enter the value of x and n"; cin>>x,n; z=pow(x,n); cout<<"the value is"<<z; }

21st Aug 2018, 5:23 PM
riya
riya - avatar
2 Antworten
+ 2
cin>>x>>n;
21st Aug 2018, 5:41 PM
Meet Mehta
Meet Mehta - avatar
+ 1
Additionally to the point by Meet Mehta; #include <iostream> no need for file extension .h #include <cmath> is necessary for definition of pow() int main() rather than void main()
21st Aug 2018, 5:54 PM
Ipang