You are on page 1of 2

Experiment No.

Roll No.C055 Name: Kesar Lania


Program:B Tech Integrated Division:B
Semester:3 Batch :3
Date of Experiment: Date of Submission:
Grade :

B.1 Software Code written by student:

1.

#include<iostream>
using namespace std;
int main()
{
doublemeters,centimeters;
cout<<"input a value in meters";
cin>>meters;
centimeters=meters*100;
cout<<"value in centimeters:"<<centimeters;
return 0;
}

2.

#include<iostream>
using namespace std;
double pow(double b,int c);
int main()
{
doublem,a;
int n;
cout<<"Enter Base\n";
cin>>m;
cout<<”Enter Exponent”;
cin>>n;
a= pow(m,n);
cout<<"The Result is:"<<a;
}
double pow(double b,int c=2)
{
double pow=1.0;
for(inti=0;i<c;i++)
{
pow=pow*b;
}
return pow;
}

B.2 Input and Output:

1.

input a value in meters 45

value in centimeters:4500

Process returned 0 (0x0) execution time : 13.268 s

2.

Enter Base
25
Enter Exponent
2
The Result is:625
Process returned 0 (0x0) execution time : 3.938 s

You might also like