This is about identifiers in a record referring to other records.
You can have many to one, one to one, many to many.
E.g., if you have two tables, Authors and Books, then a book record could have a reference to an author record. Since an author can write many books, this would be a many-to-one relationship.
Answer:
"double result=6.759;" is the correct answer for the above question.
Explanation:
- In c-programming language, the double is a data type which stores the decimal value up to 6 decimal point.
- This data type takes 8 bytes space in memory when it is used in the c-programming language.
- When the user wants to declare the double data type, then he should need to declare by the help of the following syntax-- double variable_name_or _identifier_name;
- When the user wants to declare the double data type and initialize the value on its then he can do this with the help of the following syntax--double variable_name_or _identifier_name= value_which_needs_to_store;
- The above question asked the one-line statement which declares the result variable of double data type and initializes the "6.759" value on its then he can do this by the help of "double result=6.759;" statement which is described above. Hence the answer is "double result=6.759;".
Answer:
def newton(n):
#Define the variables.
t = 0.000001
esti = 1.0
#Calculate the square root
#using newton method.
while True:
esti = (esti + n / esti) / 2
dif = abs(n - esti ** 2)
if dif <= t:
break
#Return the result.
return esti
#Define the main function.
def main():
#Continue until user press enters.
while True:
try:
#Prompt the user for input.
n = int(input("Enter a number (Press Enter to stop):"))
#display the results.
print("newton = %0.15f" % newton(n))
except:
return
#Call the main function.
main()
Answer:
n! = n*(n-1)*(n-2)*(n-3)* ... *2*1
Explanation:
The factorial operator is simply a mathematical expression of the product of a stated integer and all integers below that number down to 1. Consider these following examples:
4! = 4 * 3 * 2 * 1
4! = 12 * 2 * 1
4! = 24
6! = 6 * 5 * 4 * 3 * 2 * 1
6! = 30 * 4 * 3 * 2 * 1
6! = 120 * 3 * 2 * 1
6! = 360 * 2 * 1
6! = 720
So, the factorial of n would follow the same as such:
n! = n * (n-1) * (n-2) * ... * 2 * 1
Cheers.