ive lost quite a few marks on these questions- does anyone know what to do next??
thanks!
Original post by puppy_punk

ive lost quite a few marks on these questions- does anyone know what to do next??
thanks!

(

Sara is writing a program to input her monthly phone bills and output the month name and amount for each month along with the month that had the maximum cost.
She has defined an array to hold the month names.
Complete the pseudocode program. [6]
// Program to output maximum month’s phone bill
array monthName = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
// Define an array to hold the phone bills for each month
int billamount[12];

char monthname["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];

for (int month = 1; month<=12; month++)
{
cout<<"Enter the amount of bill for the month"<<month; cin>>billamount[month];

}

for (i=0; i<= 12; i++)
{
if (billamount[0]<billamount)

billamount[0]=billamount;

monthname[0]=monthname;

}

cout<<"Maximum months phone bill"<<monthname[0] <<"="<<billamount[0]

getch();
(edited 8 months ago)