What have you done so far?
Remember we have to help you get somewhere, but you must have something
Well for assignment 1, I have done the following. The problem is about displaying the output. It's some sort of messy, have no idea on how sorting it anymore.
#include <iostream.h>
main()
{
int cabin[5][5]={{200,210,225,300,235},
{250,465,343,255,344},
{233,333,453,268,365},
{200,325,400,333,222},
{200,160,642,674,358}};
char choose;
int total[5][5];
int i,j,m,n;
for(i=0;i<5;i++)
{
for(j=0;j<5;j++)
cout<<cabin[i][j]<<" ";
cout<<"\n";
}
cout<<"\nPress C (Capital C) to Calculate The Yearly Income For All Cabin ";
cin>>choose;
if (choose == 'C')
{
for(i=0;i<5;i++)
{
for (j=0;j<5;j++)
{
total[i][j]= cabin[i][j]*12;
cout<<total[i][j]<<" ";
cout<<"\n";
}
}
for(i=0;i<5;i++)
{
for (j=0;j<5;j++)
{
cout<<total[i][j]<<" ";
cout<<"\n";
}
}
}
}
else
cout<<"Can't You Read? Capital C Only!!!!"<<endl;
return 0;
}
For Assignment 2, I'm still making it. >.<
For Assignment 3, I have done the following. Yes, the program is not working as I have no idea where and what is the mistake. >.<
#include <iostream.h>
#define CF 0.15
#define DF 0.10
#define LB 5.00
#define OD 10.00
float result(char transaction, float balance, float amount);
void main ()
{
float b, a, i;
char t;
cout<<"\nWelcome To Mike's Banking";
cout<<"\nChoose C for withdrawal";
cout<<"\nChose D for deposit";
cout<<"\nChoose E for end of input";
cout<<"\n\nWhat's Your Current Balance";
cin>>b;
cout<<"\nWhat Transaction You Want To Do: ";
for (i=1; i>0; i++)
{
cin>>t;
}
cout<<"\nWhat's The Amount You Want To Involve: ";
cin>>a;
if (t == 'C')
{
cout<<"\nYour Current Account Balance Is: "<<b;
cout<<"\nYou Have Chosen To Withdraw Money";
cout<<"\nYour Check Fee Is $0.15";
for (i=0; i<1; i++);
{
if (b < 500)
cout<<"There's A Low Balance Fee $For 500.00";
}
for (i=0; i<1; i++);
{
if (b < 50)
cout<<"Your Balance Is Below 50 Dollars";
}
}
else if (t == 'D')
{
cout<<"\nYour Current Account Balance Is: "<<b;
cout<<"\nYou Have Chosen To Deposit Money";
cout<<"\nYour Deposit Fee Is $0.10";
for (i=0; i<1; i++);
{
if (b < 0)
cout<<"There's An Overdrawn balance fee for $10.00";
}
for (i=0; i<1; i++);
{
if (b < 50)
cout<<"Your Balance Is Below 50 Dollars";
}
}
else if (t == 'E')
{
cout<<"\nYou Have Chosen to end the transaction";
cout<<"\nYour Initial Balance Was: "<<b;
cout<<"\nYour Total Service Charges Is: ";
cout<<"\nYour End Balance Is: "<<result;
}
else
cout<<"Choose A Choice man!";
}
float result(char transaction, float balance, float amount)
{
char t;
float i, b, a;
if (t == 'C')
{
for (i=0;i<1;i++);
{
if ( b < 0 && b < 500)
{
result = b + a - 0.15 - 5;
return result;
}
else if ( b < 500)
{
result = b + a - 5;
return result;
}
else if (b < 0)
{
result = b + a - 0.15;
return result;
}
}
}
if (t == 'D')
{
for (i=0;i<1;i++);
{
if ( b < 0 && b < 500)
{
result = b + a - 0.10 - 5;
return;
}
else if ( b < 500)
{
result = b + a - 5;
return;
}
else if (b < 0)
{
result = b + a - 0.10;
return;
}
}
}
}
For Assignment 4, I have only done the first output. I have no idea on doing the calculation and the final output. >.<
#include <iostream.h>
main()
{
char seat[7][5]= {{'1','A','B','C','D'}, {'3','A','B','C','D'}, {'3','A','B','C','D'}, {'4','A','B','C','D'}, {'5','A','B','C','D'}, {'6','A','B','C','D'}, {'7','A','B','C','D'}};
int i,j, sr,
char sc;
for(i=0;i<7;i++)
{
for(j=0;j<5;j++)
cout<<seat[i][j]<<" ";
cout<<"\n";
}
cout<<"\nPlease Pick The Seat's Number";
cin>>sr;
cout<<"\nPlease Pick The Seat's Place";
cin>>sc;
return 0;
}
Any kind of help on any kind of assignments are really appreciated..