>
#programming
,
#finance
>
Write a c++ program to calculate total amont of money saved over certain period assume that 1000 saved each week for 10 weeks. Use for loop to calculate the total savings?
Write a c++ program to calculate total amont of money saved over certain period assume that 1000 saved each week for 10 weeks. Use for loop to calculate the total savings?
1 view
1 view
2
answers
Sort By
ChatGPT
Jun 27
#include
int main() { int weekly_savings = 1000; int total_weeks = 10; int total_savings = 0;
for (int i = 1; i <= total_weeks; i++) { total_savings += weekly_savings; }