C code
Extracted text: You need to write a program that analyses the savings of a child who wants to buy a bike. Your program needs to get the initial saving, the number of weeks the analysis will be done and it will report the amount of savings at the end of the number of weeks entered and it will also make an assessment of the savings. Your program will have two functions to complete the task: f. double savings (int w, double initial savings):Assume that the child can save 20 TL per week and the amount of savings in the current week compared to the previous week is: savings (w) = 1.1savings (w-1) + 20 Write a recursive function that computes the total amount of savings at the end of week, w with the initial amount of savings given to the function. Please note that in week 0, your total amount of savings is the initial_savings given to the function. And In every week, you receive 1% increment of your savings because they are deposited in the bank. void analysis (double savings, int bike_price): This function takes the amount of savings and the price of a bike, and displays the necessary message on the output. Savings Savings>=bike_price Savings< bike_price message you can buy the bike!! oops! save more money! please note that in this program, the kid cannot start with zero savings. it should have a saving to start the analysis. after completing the analysis once, the program will ask the user if they want to do another analysis. valid answers are (y/y or n/n) and if other characters are entered, your program should ask them to enter again. sample run: welcome to bike analyser! enter your initial savings: 0 sorry you cannot enter 0! enter your initial savings: 20 number of weeks: 3 at the end of week 3, savings will be 92.82 tl enter the price of the bike: 200 save more money!! do you want to try again? y enter your initial savings: 20 number of weeks: 4 at the end of week 4, savings will be 122.10 tl enter the price of the bike: 200 save more money!! do you want to try again? m not valid input! do you want to try again? n byee! recommended reading: chapter 7 (p. 328-342 & & 364-372) recommended exercises: exercises 7.1, 7.2 and 7.5. bike_price="" message="" you="" can="" buy="" the="" bike!!="" oops!="" save="" more="" money!="" please="" note="" that="" in="" this="" program,="" the="" kid="" cannot="" start="" with="" zero="" savings.="" it="" should="" have="" a="" saving="" to="" start="" the="" analysis.="" after="" completing="" the="" analysis="" once,="" the="" program="" will="" ask="" the="" user="" if="" they="" want="" to="" do="" another="" analysis.="" valid="" answers="" are="" (y/y="" or="" n/n)="" and="" if="" other="" characters="" are="" entered,="" your="" program="" should="" ask="" them="" to="" enter="" again.="" sample="" run:="" welcome="" to="" bike="" analyser!="" enter="" your="" initial="" savings:="" 0="" sorry="" you="" cannot="" enter="" 0!="" enter="" your="" initial="" savings:="" 20="" number="" of="" weeks:="" 3="" at="" the="" end="" of="" week="" 3,="" savings="" will="" be="" 92.82="" tl="" enter="" the="" price="" of="" the="" bike:="" 200="" save="" more="" money!!="" do="" you="" want="" to="" try="" again?="" y="" enter="" your="" initial="" savings:="" 20="" number="" of="" weeks:="" 4="" at="" the="" end="" of="" week="" 4,="" savings="" will="" be="" 122.10="" tl="" enter="" the="" price="" of="" the="" bike:="" 200="" save="" more="" money!!="" do="" you="" want="" to="" try="" again?="" m="" not="" valid="" input!="" do="" you="" want="" to="" try="" again?="" n="" byee!="" recommended="" reading:="" chapter="" 7="" (p.="" 328-342="" &="" &="" 364-372)="" recommended="" exercises:="" exercises="" 7.1,="" 7.2="" and=""> bike_price message you can buy the bike!! oops! save more money! please note that in this program, the kid cannot start with zero savings. it should have a saving to start the analysis. after completing the analysis once, the program will ask the user if they want to do another analysis. valid answers are (y/y or n/n) and if other characters are entered, your program should ask them to enter again. sample run: welcome to bike analyser! enter your initial savings: 0 sorry you cannot enter 0! enter your initial savings: 20 number of weeks: 3 at the end of week 3, savings will be 92.82 tl enter the price of the bike: 200 save more money!! do you want to try again? y enter your initial savings: 20 number of weeks: 4 at the end of week 4, savings will be 122.10 tl enter the price of the bike: 200 save more money!! do you want to try again? m not valid input! do you want to try again? n byee! recommended reading: chapter 7 (p. 328-342 & & 364-372) recommended exercises: exercises 7.1, 7.2 and 7.5.>