473,395 Members | 1,783 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

seat pattern

im suppose to do a "airplane sitting" program

1 a b c d
2 a b c d
3 a b c d
(till 7)

den if i ask a user to type in their seats...

1 a b x d
2 a x c d
3 a b c d
(till 7)

pick seats will become "x"

now im stuck...
Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int i,n,len;
  8.     char x[3];
  9.     char status[15];
  10.  
  11.     cout<<"This is an airplane passengers seats program"<<endl<<endl;
  12.  
  13.     for(n=1;n<=7;n++){
  14.     cout<<n<<" \tA\tB\tC\tD"<<endl<<endl;
  15.     }
  16.  
  17.     cout<<"Please enter your seat accordingly : ";
  18.     cin.getline(x,3);
  19.     cout<<endl;
  20.     len=strlen(x);
  21.  
  22.    // for (i=0;i<=len;i++)
  23.    // x[i]=toupper(x[i]);
  24.  
  25.     for(int j=1;j<=7;j++){
  26.     cout<<j<<" \tA\tB\tC\tD"<<endl<<endl;
  27.     }
  28.  
  29.  
  30.  
  31.  
  32.  
  33.     cout<<"Thank you for using this program"<<endl;
  34.     cout<<"Have a nice day"<<endl;
  35.  
  36.     system("pause");
  37.     return 0;
  38. }
Apr 2 '07 #1
0 1102

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: gsv2com | last post by:
One of my weaknesses has always been pattern matching. Something I definitely need to study up on and maybe you guys can give me a pointer here. I'm looking to remove all of this code and just...
5
by: Ben | last post by:
We have a MSSQL with per seat license of 20. The MSSQL is sitting in the same machine as the asp.net. Does that mean that the the no. of connections and Max Pool Size are limited up to 20 only?...
34
by: Steven Nagy | last post by:
So I was needing some extra power from my enums and implemented the typesafe enum pattern. And it got me to thinking... why should I EVER use standard enums? There's now a nice little code...
0
by: vbnm | last post by:
I have two table of Access 2003 one of them called student and the other one called company. The company table contains company_name and seat_num. The student table contains student_num and...
1
by: jenice | last post by:
Good afternoon, I have a web page with about 20 pages and I need to create a bus seat layout creating dynamically with Javascript so every time a make a modification to that seatlayout, I don't...
1
by: NoviceDBA | last post by:
Hi , I am a junior DBA and I have been asked to Install and confingure SQL server 2000 on Win 2003 server, and I would like to create a replica of the existing server, so how do i find the no. of Per...
2
by: thesti | last post by:
hi, i'm asked to create a program in which there's a component like this http://jakkos.110mb.com/images/component.JPG it's like a seat reservation program. in which we are able to...
0
by: raveekumarg | last post by:
hi what is the difference between per seat , per server , per processor and i am new to sql 2000 , pl do explain the same.
3
Slick47
by: Slick47 | last post by:
Hey guys, I've gone one problem (so far) in my program to be able to assign and display seats. When I compile my program I get the error: SeatAssign.java:54: setSeats(char) in SeatAssign cannot...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.