#include <stdio.h>
int main ()
{
char n[30];
char l[100];
char j[50];
char p[100];
int age, salary, expense, loanamt, Time, c, i, lm,emi;
printf("HDFC\n");
printf("Loan elegbility form\n");
printf("Name: ");
scanf("%s",n);
printf("Age: ");
scanf ("%d",&age);
printf("Job:");
scanf("%s",j);
printf("Monthly Income:");
scanf("%d",&salary);
printf("Monthly Expense:");
scanf("%d",&expense);
printf("purpose of loan:");
scanf("%s",p);
c = salary - expense;
printf ("Savings:%d\n", c);
if (salary<40000)
{
lm = c * 50;
printf("Eligible loan amount:%d\n",lm);
}
else
{
lm = c*25;
printf("Eligible loan amount:%d\n",lm);
}
printf("Time taken to complete in months:");
scanf("%d", &Time);
printf("your loan completion time in months is :%d\n",Time);
if(Time>61)
{
printf(" Sorry loan NOT AvAILABLE more than 60 months\n");
}
else
{
printf("Rate of intest is 12%\n");
i=c*12/100;
printf("your rate of intest per month is %d\n", i);
emi= lm*12/100*(1 + 12/100)^Time/((1 + 12/100)^Time - 1);
printf("Your EMI amount is monthly %d/- only\n",emi);
printf("Would you like to proceed:)\n");
printf("Tap to continue");
}
return 0;
}