Answer: Machine independent programming language which is known as COBOL.
Explanation:
Grace hopper born in 1906 in the New York city and she made the machine independent programming language idea popular all over the world. It prompted the advancement of COBOL, an early significant level programming language even used today.
Preceding joining the US Navy, Hopper done her Ph. D in the mathematics subject from the Yale University and she was also a professor at the Vassar College.
Your while statement is in error
<span>while (wage = 0) assigns 0 to wage.
What you want is to compare wage to 0, ie.:
while (wage == 0).
However, comparing double's to some value is very bad practice due to rounding errors. Much safer is to always have a < or > in there:
while (wage < 0.0001)
If you confuse assignment (=) and comparison (==) often, and you don't have a compiler to warn you for this, you can adopt the coding style to put the constant first:
while(0 == x)</span>
Answer:
p(x,n)
1. if(n==0) [if power is 0]
2. then result =1.
3.else
4. { result=1.
5. for i=1 to n.
6. { result = result * x. } [each time we multiply x once]
7. return result.
8. }
Let's count p(3,3)
30, so come to else part.
i=1: result = result *3 = 3
i=2: result = result *3 = 9
i=2: result = result *3 = 27
Explanation:
here the for loop at step 4 takes O(n) time and other steps take constant time. So overall time complexity = O(n)