Why my program not give proper output for Final Amount? (SOLVED)
Write a program to create a structure called BankDeposit(). Structure members are amt (amount to deposit in bank), tenure (No. of years the deposit to be maintained). Create another structure called Date(), structure members are int date, int month, int year. Enter DOB of person, Date of deposit using Date structure variables. Calculate present age of the person. If the person is senior citizen (age >=60 yrs) then rate of interest is 9%, else 8%. Calculate the total amount that person receives after date of maturity (=date of deposit+ tenure). Structure BankDeposit () { Int amt; Int tenure; }; Structure Dates () { Int date; Int month; Int year; }; Input1: Amt=1000 rs. Tenure=2 years DOB= 01/01/1960 Output1: Age= 61 years Interest=9%=0.09 Final amount=amt+(amt*interest*tenure) =1180 rs. Input2: Amt=1000 rs. Tenure=2 years DOB= 01/01/2000 Output2: Age= 21 years Interest=8%=0.08 Final amount=1160 rs.