Answer:
Following are the program to the given question:
#include <stdio.h>//header file
double square_root(double N, double initialGuess)//defining a method square_root that takes two variable in parameters
{
double NG, LG = initialGuess,diff;//defining double variable
while(1)//use loop to calculate square root value
{
NG = 0.5 * (LG + N / LG);//using given formula
diff = NG - LG;//calculating difference
if(diff < 0)//use if to check difference is less than 0
diff = -diff;//decreaing difference
if(diff < 0.005)//use if that check difference is less than 0.005
break;//using break keyword
else//defining else block
{
LG = NG;//holding value
}
}
return NG;//return value
}
int main()//defining main method
{
double ans, n,initialguess = 1.0;//defining double variable
n = 4;//use n to hold value
ans = square_root(n, initialguess);//calculating the square root value and print its value
printf("square_root(%lf) = %lf \n", n, ans);//print calculated value with number
n = 120.5;//use n to hold value
ans = square_root(n, initialguess);//calculating the square root value and print its value
printf("square_root(%lf) = %lf \n", n, ans);//print calculated value with number
n = 36.01;//use n to hold value
ans = square_root(n, initialguess);//calculating the square root value and print its value
printf("square_root(%lf) = %lf \n", n, ans);//print calculated value with number
n = 0.25;//use n to hold value
ans = square_root(n, initialguess);//calculating the square root value and print its value
printf("square_root(%lf) = %lf \n", n, ans);//print calculated value with number
printf("\nEnter a number: ");//print message
scanf("%lf", &n);//input value
ans = square_root(n, initialguess);//calculating the square root value and print its value
printf("square_root(%lf) = %lf \n", n, ans);//print calculated value with number
}
Output:
Please find the attachment file.
Explanation:
In this code, a method "square_root" is declared that takes two variable "N, initialGuess" in its parameters, inside the method a three double variable is declared.It uses the given formula and uses the diff variable to hold its value and uses two if to check its value is less than 0 and 0.005 and return its calculated value.In the main method, three double variables are declared that use the "n" to hold value and "ans" to call the method that holds its value and print its value."All data types are keywords but all keywords are not data types", justify this statement.
Keywords Are Reserved Words Which Are Not Use As Normal Cases But Used For Special Purpose In Our Program whereas, Data Type Tells The Compiler And Interpreter How The Program Is Going To Be Executed And Can Be Used At Every Cases.
Hope This Helps You ❤️Based on how they are stored in the computer, the types produced by these keywords can be categorized into two families, integer types and floating-point types.
What is the relation between data and keyword?Bit, byte, and word are terminology that can be used to refer to either memory or data storage units in computers.
The main distinction between text fields and keyword fields is that text fields are examined during indexing, whereas keyword fields are not.
This means that while keyword fields are indexed exactly as is, text fields are split down into their constituent phrases at indexing to allow for partial matching.
A word or collection of words that an Internet user enters into a search engine or search bar to conduct a search is referred to as a keyword in the context of digital marketing.
Therefore, All data types are keywords, but all keywords are not data types.
Learn more about data and keywords here:
https://brainly.com/question/9588905
#SPJ2
SN1 reactions usually proceed with ________. A) equal amounts of inversion and retention at the center undergoing substitution B) slightly more inversion than retention at the center undergoing substitution C) slightly more retention then inversion at the center undergoing substitution D) complete inversion at the center undergoing substitution E) complete retention at the center undergoing substitution complete retention at the center undergoing substitution slightly more retention then inversion at the center undergoing substitution complete inversion at the center undergoing substitution equal amounts of inversion and retention at the center undergoing substitution slightly more inversion than retention at the center undergoing substitution
Answer:
equal amounts of inversion and retention at the center undergoing substitution
Explanation:
In an SN1 reaction, the rate determining step is the formation of a carbonation which is flat and planar.
This means that both faces of the carbo cation are equally available for attack by the nucleophile.
Attack on either of the faces may occur equally thereby yielding a racemic mixture.