Answer:
The time complexity of the code is O(log₇n).
Explanation:
The i is updated by 7*i.On each iteration i is multiplied by 7.So on finding the time complexity of the code given above it will come out to be log base 7.
When we divide the input by 2 the time complexity is log base 2.
So on dividing it by 7 we get the time complexity of log base 7.
Answer:
Following are the code in Java Language:
Scanner sc = new Scanner(System.in); // create a instance of scanner class
DecimalFormat frmt = new DecimalFormat("0.###"); // create a instance of // DecimalFormat class
System.out.println ("Enter the value: ");
double number = scan.nextDouble(); // Read the value by thje user
System.out.println (fmmt.format(Math.pow(number, 4))); // display the value
Explanation:
Following are the description of the code
- Create an instance scanner class i.e "sc".
- Create an instance of DecimalFormat class i.e "frmt".
- Read the value by the user in the "number" variable of type double by using the nextDouble()method.
- Finally, display the value by using System.out.println method. In this, we call the method format. The Math.pow() function is used to calculating the power up to the fourth value.
The program is an illustration of built-in functions
<h3>What are
built-in functions?</h3>
They are named program statements that have a predefined purpose
<h3>The actual program</h3>
The program written in C++, where comments are used where required is as follows:
#include <iostream>
#include <cmath>
#include <ios>
#include <iomanip>
using namespace std;
int main (){
double x;
double y;
double z;
cin>>x;
cin>>y;
//This calculates the given expression
z = pow(sqrt(y),x);
cout << fixed<<setprecision(2);
cout<<z<<endl;
return 0;
}
Read more about python functions at:
brainly.com/question/14284563
Answer:
Nonexclusive forwarding
Explanation:
In Nonexclusive forwarding, DNS forwarding is setup so that if the DNS server receiving the forwarded request cannot resolve the name, then the server that originally forwarded the request makes an attempt to resolves it. If that fails, the server sends a request to its designated forwarder.