#include<stdio.h>

void deposit_interest(long month_deposit, int year)
{
 float amount;
 int month = year * 12;
 float rate;
 
 if (month_deposit < 1000000 && year < 5)
  rate = 0.037;
 else if (month_deposit < 1000000 && year >= 5)
  rate = 0.043;
 else if (month_deposit >= 1000000 && year < 5)
  rate = 0.039;
 else
  rate = 0.046;

 
 amount = (month_deposit * rate) * ((month *(month+1)) /2/12);
 
 printf("납입년수: %d년\t 매월 저축액: %d원\t 이율: %f%%\n", year, month_deposit, rate*100);
 printf("\n");
 printf("총수령액: %f원   원금: %d원\t이자: %f원\t\n", amount, month_deposit * month, amount, (month_deposit * month) );
 printf("\n");
 printf("\n");
}

 

int main(void)
{
 long saving;
 int year;

 printf("매달 적금 입금액을 설정해주세요(원):");
 scanf("%d", &saving);
 printf("기간을 설정해주세요(년):");
 scanf("%d", &year);

 
ㅁㅁㅁㅁㅁㅁㅁㅁㅁㅁㅁㅁㅁㅁㅁㅁㅁㅁㅁㅁㅁ

 return 0;



생각안하는게아니구... 이거만 6시간째 메달려서 하고있는데요...
함수까지 다만들어놨는데 정작 이걸 년이랑 금액을 설정해놓고 어떻게 함수를 출력해와야할질 모르겠어요...
포인터로 해야하나요?... 사람목슴살린다생각하고좀 도와주세요 ㅠㅠ부탁드려요 ㅠㅠㅠ 으아 ㅠㅠ
}