Sunday, February 27, 2011

0

C Program Language (Bank Problem)

  • Sunday, February 27, 2011
  • RJ
  • Share


  • This is the output in calculating the charges of interest. In this c program, it shows how to get the total amount of percentage. It ask the use to input the principal amount, the percent rate per month and the months to pay. Not try to see the codes that were being used.
    The codes for this program.
    #include<stdio.h>
    #include<conio.h>
    
    main()
    {
    float n1,n2,n3,dept;
    printf("Enter the principal amount owed:");
    scanf("%f",&n1);    
    printf("Enter percent interest rate per month:");
    scanf("%f",&n2);
    if(n2==0){
    printf("Out of percentage!!");
    }
    else{
    printf("Enter number of months to pay:");
    scanf("%f",&n3);
    dept = ((n1*(n2/100))*n3)+n1;
    printf("\n\nThe total amount with percentage is  %.2f",dept);
    } 
    
    getch();
    
    }
    

    0 Responses to “C Program Language (Bank Problem)”

    Post a Comment

    Subscribe