Answer:
int sumAll(int n)//function definition.
{
if(n==1)//if condition.
return 1;
else//else condition.
{
return n+sumAll(n-1);//return the value and call the function in recursive manner.
}
}
Explanation:
- The above-defined function is a recursive type function that is written in the c language, which holds the if and else condition.
- When the user passes the largest value from 1, then the else condition will be executed which adds the largest value and pass the value after the decrement of the value as an argument.
- When the value will become 1, then the function if-block will be executed which returns the value and ends the calling function recursively.
Answer:
________________________
The following is a list of "6 (six) errors" :
__________________________________
1) The "city, state, and zip code" should be listed on a separate line, directly following the street address:
_______________________________________________________
→ Hartford, CT 06114
_______________________________________________________
2) In "Objective" section: The misspelled: "challenging" should be changed to "challenging".
_______________________________________________________
3) In the "Objective" section: The word: "righting" should be changed to:
"writing".
_______________________________________________________
4) In the "Summary" section: The misspelled: "addjust" should be changed to: "adjust" .
________________________________________________________
5) The misspelled "impppeccable" should be changed to "impeccable".
________________________________________________________
6) Perhaps, "drive-thru" should be changed to: "drive-through" ; but even more importantly— refer to:
________________________________________________________
"Managed all staff and ensured hi performance and efficiency" ;
→ The "hi" should be changed to "high".
___________________________________________________
These are some errors. Glad to be of help!
___________________________________________________
Answer:
The correct code for this question:
g=float(input("Enter your English test grade:")) #take input from user.
#check conditions
if (g>=100 and g<=90):
print ("A")
#g greater then equal to 100 and less then equal to 90.
if (g>=89 and g<=80):
print("B")
#g greater then equal to 89 and less then equal to 80.
if (g>=79 and g<=70):
print("C")
#g greater then equal to 79 and less then equal to 70.
if (g>=69 and g<=65):
print("D")
#g greater then equal to 69 and less then equal to 69.
if(g<=64):
print("F")
#g less then equal to 64.
else:
print ("Not a grade")
#not a grade or fail.
Explanation:
In this program, we use to take a value from the user and check the value from the various conditions. To check all the condition we use if-else statement and AND operator that check to the range to together.
If -else is a conditional operator. In that, If block is used to check the true part and else part takes false value, and AND is a logical operator that check the two range together
Answer:
In assembly language, two instructions control the use of the assembly language procedure.
CALL pushed the control to the return address onto the stack and transferred the control.
RET instruction returns the address that placed on the stack by a call instruction.
Explanation:
Action RET instruction
- The RET instruction pops the address and returns off the stack, which is pointed by the stack pointer.
- The stack is LIFO in memory at a particular location, and the pointer points offset from the stack location.
RET instruction does its job by consulting the register and memory state at the point when it is executed.
In RET instruction, only register and memory state is executed. Call instruction must save that address that figure out in a register and memory location.