1!•Option 1
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
int bud[7] = {1,2,3,4,5,6,7};
int kv[5] = {1,2,3,4,5};
int mounth[12] = {1,2,3,4,5,6,7,8,9,10,11,12};
int pay=800;
cout<<"plese enter #mounth"<<endl;
int n;
for (int i = 0; i < 12; i++)
for (int k = 0; k < 7; k++)
for (int j = 0; j < 5; j++)
{ cout<<"mounth ---"<<mounth[i]<<endl;
cout<<"bud ---"<<bud[k]<<endl;
cout<<"pay="<<pay<<"$"<<endl;
cout<<"kv ---"<<kv[j]<<endl<<endl;
}
system("PAUSE");
return 0;
}
2!•Option 2
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
int bud;
int kv;
int mounth[12] = {1,2,3,4,5,6,7,8,9,10,11,12};
int pay=800;
cout<<"plese enter home "<<endl;
cin>>bud;
cout<<"plese enter room "<<endl;
cin>>kv;
int n;
for (int i = 0; i < 12; i++)
{ cout<<"mounth ---"<<mounth[i]<<endl;
if (bud<8) cout<<"bud ---"<<bud<<endl;
if (kv<6) cout<<"kv ---"<<kv<<endl;
cout<<"pay="<<pay<<"$"<<endl<<endl;
}
system("PAUSE");
return 0;
}
3!•Option 3
#include <iostream>
#include <stdlib.h>
using namespace std;
int main()
{
int bud;
string name;
int mounth[12] = {1,2,3,4,5,6,7,8,9,10,11,12};
int pay;
cout<<"plese enter monthly income"<<endl;
cin>>pay;
cout<<"plese enter how many bedrooms they want "<<endl;
cin>>bud;
cout<<"plese enter name "<<endl;
cin>>name;
int room[4]= {1,2,3,4};
int n;
for (int i = 0; i < 12; i++)
for (int k= 0; k < bud; k++)
{ cout<<"mounth ---"<<mounth[i]<<endl;
cout<<"money ---"<<pay<<"$"<<endl;
cout<<"name ---"<<name<<endl;
cout<<"number of bedrooms ---"<<room[k]<<endl<<endl;
}
system("PAUSE");
return 0;
}
Comments
Leave a comment