How to make a code for this ?

I'm still a beginner in the R and studying alone, but ex questions are too difficult
I don't know how to start through these two sentences

1 - Write the code showing the total amounts of moneys.
(1) Create a vector named ‘deposit’ from 10 to 100 by 1.
(2) Create a vector named ‘month’ from 1 to 12 by 1.
(3) Compute the total amounts when you deposits the amounts of ‘deposit’ for
‘months’. The annual interest rate is 1.8%.
#Hint) The total amounts = deposit + interest during the deposit months.

2 - Write the code according to the instruction.
(1) Create a vector x from 1 to 99.
(2) Take the number from the user and assign that number to ‘opt’.
(3) If ‘opt’ is 1 then return the average of x, if ‘opt’ is 2 then, return the standard
deviation of x, if ‘opt’ is smaller than 1, than return the quantile value of x at
the number. If x is 3, then return the median value. If x is greater than 3, then
print (“your number is out of ranges!”).

Plz help me....

Hi there and welcome to Community!

This looks like a homework problem, so instead of doing the work for you I'd rather try to walk you through the process so that you can learn and make the most of it. For starters, what have you tried already? Where are you getting stuck?

The below link is a great start for asking these kinds of questions so that you're able to get the greatest benefit from everyone's help!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.