calculate simple interest in c

 #include<stdio.h>

int main()

{

    int principal, rate, years;

    printf("Enter the principal\n");

    scanf("%d", &principal);

    printf("Enter the rate\n");

    scanf("%d", &rate);

    printf("Enter the years\n");

    scanf("%d", &years);

    printf("The value of simple interest is %d",(principal*rate*years)/100);

return 0;

}

Comments

Popular posts from this blog

create a num table in a new file in c

write a programme to compare time stamp in c

write a struct programme to keep bank details in c