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;
    }
}

Replies

  • Neeraj Sharma
    Neeraj Sharma
    Well is this a question or information? The program looks fine to me

You are reading an archived discussion.

Related Posts

I came across a report from the last week published in ET last week - 2 lakh IT engineers to lose jobs annually in the next 3 years: Head Hunters...
Quote: (Plastic waste is a gigantic problem that we all have to take responsibility for, and one in which engineers have a key role in solving.) Henderson Island, part of...
HI ..... I AM A GRADUATE IN COMPUTER SCIENCE FROM AGRA UNIVERSITY WILLING TO PURSUE CAREER IN THE SAME FIELD...HEARD IPU COLLEGES ARE GOING GOOD ...CAN SOMEONE SUGGEST ME HOW...
Will they? Not in India I guess. Not in the near future. Even if it does happen, how will the electric power be generated? Unless it is nuclear power, thermal...
Hi guys Some of the old members would know @spandana07 sings.. She has a smule account. I request all of you to please listen and follow her to support her....