[SOLO] Write a program that uses a two-dimensional array to store the highest and lowest temperatures for each month of the year. The program should output the average high, average low, and the highest and lowest temperatures for the year. Your program must consist of the following functions:
d. FunctionindexHighTemp:Thisfunctionreturnstheindexofthehighesthightemperatureinthearray.
FunctionindexLowTemp:thisfunctionreturnstheindexofthelowestlowtemperatureinthearray.(These functions must all have the appropriate parameters.)

please help me.... i will submit it this wednesday.... tnx to those who will help me...

8 Years
Discussion Span
Last Post by jephthah

[SOLO] (Airplane Seating Assignment) Write a program that can be used to assign seats for a commercial airplane. The airplane has 13 rows, with 6 seats in each row. Rows 1 and 2 are first class; the remaining rows are economy class. Also, rows 1 through 7 are nonsmoking. Your program must prompt the user to enter the following information: a. Tickettype(firstclassoreconomyclass)b. Foreconomyclass,thesmokingornonsmokingsectionc. DesiredseatOutput the seating plan in the following form:
Row1 **X*XX
Row2 *X*X*X
Row3 **XX*X
Row4 X*X*XX
Row5 *X*X**
Row6 *X***X
Row7 X***XX
Row8 *X*XX*
Row9 X*XX*X
Row10 *X*XXX
Row11 **X*X*
Row12 **XX*X
Row13 ****X*

Here, * indicates that the seat is available; X indicates that the seat is occupied. Make this a menu-driven program; show the user’s choices and allow the user to make the appropriate choices. –––––––– Nothing Follows ––––––––


Here are some quotes from the rulebook:

Do not post homework problems expecting a quick answer without showing any effort yourself. This especially pertains to the software development forums. For easy readability, always wrap programming code within posts in code blocks and inline code tags.

And :

Do not post threads with generic subjects such as "HELP ME" or "PROBLEM". Instead, clearly state a phrase describing the problem as the thread's title. Do not flood the forum by posting the same question more than once (ie in multiple forums).

So you've broken quite a lot of the rules with your posts...

Anyhoo: What have you tried so far? You're not going to get free homework, so you'll have to show that you made an effort to solve this problem yourself.

Edited by happygeek: fixed formatting


but i dont know any part of it.....

im juct a begginer and that problem is given to me... please, just a part of it will help me


> but i dont know any part of it.....
The point of homework is for you to learn as you do it. You're not supposed to understand everything completely and be able to write it all without any effort. :icon_rolleyes: In fact, Edward would say that figuring things out on your own is the key to really learning how to do something.


i dont know how to make array on a function...

i promise i will make it..

if only i know what to do first,....


i dont know how to make array on a function...

I'll give you a small start:

int main()
    const int rows = 13, seats = 6;  
    char plane[rows][seats]; // make a 2d array for all the seats

    for (int k = 0 ; k<rows; k++) // loop through the rows
        for (int l = 0; l<seats; l++)// in each row loop through the seats
            plane[k][l] = '*';       // set all the values standard to '*' 

This code creates a 2d-array and fills it with stars. Now what you need to do is make a menu so that the user can input what kind of seat (s)he wants.
If you have any questions about the code, (I guess you will) just ask.


What ?!, did you read neik_e's post.. :angry:
Nobody's going to do your work for you..

You're right, although you got my name wrong ;)


thnk you mr.... that is i find it rellly hard using 2d array....

i will send to you what i s my progress on that ticket program....

tnx mr....


sniper.... hm, i hope you're not really a sniper, because, well... i guess i'd just be sad a little bit... uh, never mind.

anyhow. check out my post in your other thread about 2D arrays, maybe it will help you.


hahaha ok i'm sori....

now i know i little bit about array ...

i'm just a newbie...

i dont know why it is on my syllabus ...

i am taking up electrical engineering and yet i have c++

well... thats ok atleast..

tnx niek_e


really, man, if you're going to be an electrical engineer someday, you need to learn how to approach problems methodically without all the whining and crying.


seriously. Arrays -- 2-D and otherwise -- are freshman material. theres a concept you should become familiar with, it's called: Look It Up


int userInput(int);
int main()
int x,y;
int a;
const int row= 12,seat= 5;
char plane[row][seat];
{for (y=0;y<=12;y++)
  { plane[y][x]='*';
return 0;

where will i put ROW so that it has label on the y-axis????

Edited by Dani: Formatting fixed


i answered this question in the other thread.

in the future please don't double post the same question in two different threads.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.