C++

profilelion77
lab_029.pdf

/* lab No. 29 Motivation: Demonstrating use of standard library function Problem: Design an application the will recive tow double values from user and then the application using math.h library will deliver the result */ #include <iostream> #include <math.h> #include <stdio.h> using namespace std; int main(void) { double x = 2.0, y = 3.0; //printf("%if raised to %if is %if\n",x, y, pow(x, y)); cout<<"The number "<< x<<"raised to power " <<y<<"is:"<<endl; cout<< pow(x, y); char v1; cin>>v1; return 0; } /* Typical output The number 2raised to power 3is: 8 */