In C++ Please,
Write a program that (1) prompts for two integers, (2) prints out their sum, (3) prints out the first divided by the second, and (4) prints out the natural log of the first number raised to the power of the second number.
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
<your answer goes here>
return 0;
}
#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { int number1, number2; cout << "Enter two integers: "; cin >> number1 >> number2; cout << "Sum: " << number1 + number2 << endl; cout << "First divided by second: " << number1 / number2 << endl; cout << "log of first raised to power of second: " << log(pow(number1, number2)) << endl; return 0; }
Get Answers For Free
Most questions answered within 1 hours.