#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;
}
}
Comments
Leave a comment