Answer to Question #230253 in C++ for Flacko

Question #230253
Write a program for a real estate company. The Program should be able to accept the full name of tenants, the total rent (advance) paid, also calculate 10% of the total rent advance paid. Finally, the program should return or display the full name and the 10% charge on the rent advance
1
Expert's answer
2021-08-27T14:02:02-0400
#include <iostream>


using namespace std;


struct student


{
char name[20];
int rent;
char add[40];
};


int main()
{
student stu[5];
int i;


for (i = 0; i <=4; i++)
{
cout << "\n Enter name: ";
cin >>stu[i].name;
cout << "\n Enter total rent: ";
cin >>stu[i].rent;
float charge=stu[i].rent *0.1;
cout<<"Name is "<<stu[i].name<<" and the total rent is "<<charge;
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS