Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need this in c programming assignment is given and also code is given you just have to code the lines where it says TODO
I need this in c programming
assignment is given and also code is given you just have to
code the lines where it says TODO here
please edit the code that i have given and please send me screenshot of the output as well
ITs a single assignment so please do answer both parts
Part 1. gdb. In this lab, you will learn how to use a debugger on the command line to squash bugs in C programs. At the beginning of the lab, your TA will give an introduction to gdb, The GNU Project Debugger. This introduction will be relatively brief and cover only a small fraction of what GDB has to offer. For those interested in learning more, a complete guide to GDB can be found at ftp://ftp.gnu.org/ old-gnu/Manuals/gdb/html_node/gdb_toc.html. There are also numerous other resources online You are provided two programs to debug and fix as follows fibonacci.c should take an input (n) from user, and calculate and print fibonacci(n). For example, for n-5 it should print 5 (we assume that 0 is the 0th Fibonacci number). The Fibonacci series: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, .. whileloop.c prints the number of odd and even number between 0 and 199. Once the program is fixed, it should output odd-100 even-100 Find and fix all syntax errors and bugs in whileloop.c and fibonacci.c, and submit the fixed code. Botlh programs should be fixable with only a few modifications Complete rewrites of any of the programs will not be considered correct solutions Part 2. Fixed deposit calculator A series that depends on i is recursively defined as follows Ao(i) 1000. 1200 The above sequence shows us how much money we would have after n months if we initially deposit 1,000 dollars with fixed annual interest rate i percent. Here we assume i is an integer. We will do the above calculations in our code. The starter code will prompt a user to input a value for n (between 1 and 100) and i (between 1 and 5). For the given value, balance) function in seq.c must compute the value of An(i) using recursion. The main function prints An(i). Do not modify the main function. Your task is limited to the balance function. Do not print anything in the function. You must use the above recurrence for computing the value, do not use other methods. Execution of the program after completing the function must produce the output listed below for the given input $ ./seq Enter n: 100 Enter i:5 After 100 months, $1,000 becomes $1515.58 untitled fibonacci.c x includeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started