Mahapotta
Mahapotta
Branch Unspecified
21 May 2017

How to find the total rent in given program

#include<stdio.h>
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;
    }
}
Neeraj Sharma

Neeraj Sharma

Computer Science
22 May 2017
Well is this a question or information? The program looks fine to me

Share this content on your social channels -

Only logged in users can reply.