Hi I was assigned a project in my C++ class. the project is to write a program using arrays. I have to write it for a plane that has 15 seats. Seat 1 to 7 is first class and seat 8 to 15 is economy. The program should be able to prompt the use to enter "E" of "F". E will assign first economy seat and F will assign first class. The program has to be able to assign any empty seat either in economy or first class if all the seats are filled in the users first choice (fist class or economy. please help me I have no clue what to do with the coding for this program.
kpack08
0
Light Poster
Recommended Answers
Jump to PostOnly one thing you lack: effort (or at least show it.)
http://www.daniweb.com/techtalkforums/announcement8-2.html
I'd start by drawing out your tasks that you need to complete. Make a visual representation of the seats on the plane, and write and test sections of the program at a time. It helps, …
Jump to Post>i have never taken a programming class in my life.
Talk to your teacher about this. C++ is a bit difficult for a beginner, and if everyone else in your class has already had some experience with C (or another programming language of some kind), you are going to find …
Jump to Post#include"stdafx.h" #include <iostream> #include <string> #include <sstream> using namespace std; int x[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; char e, f; int total = 0; int seat_found = 0; int I; int main ( void ) …
Jump to Post>also "I" is upper case in my program but when I copy and paste in here it chances to lower case that's odd.
I doubt you are copying and pasting that. You must be passing that through another program which highlights key words for you.
But it does …
All 15 Replies
John A
1,896
Vampirical Lurker
Team Colleague
kpack08
0
Light Poster
John A
1,896
Vampirical Lurker
Team Colleague
kpack08
0
Light Poster
ft3ssgeek
-1
Junior Poster
iamthwee
kpack08
0
Light Poster
kpack08
0
Light Poster
iamthwee
iamthwee
kpack08
0
Light Poster
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
kpack08
0
Light Poster
John A
1,896
Vampirical Lurker
Team Colleague
~s.o.s~
2,560
Failure as a human
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.