View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12915 Members
Join this group to post and comment.
Mahapotta
Mahapotta • May 21, 2017

How to find the total rent in given program

#include
int main()
{
    int rent,year,incre,a,s;
    printf("Rent Per month\n");
    scanf("%d",&rent);
    puts("INCREAMENT\n");
    scanf("%d",&incre);
    printf("HOW MANY YEARS\n");
    scanf("%d",&year);
    for(a=1;a<=year;a++)
    {
 printf("The rent for year %d is %d\n",a,rent*12);
        rent=rent+incre;
    }
}
Well is this a question or information? The program looks fine to me

Share this content on your social channels -