Ask coding questions

← Back to all posts
Problems with two dimensional array
5S-1919

I had written a program to do the stuff below:

(“Business class” and “Economy class” and the fares for these classes are $5,000, $2,500 and $1,000 respectively. The only aircraft owned by this airline company has 4 “First class” seats, 4 “Business class” seats and 4 “Economy class seats”. The user of the program is prompted to enter “1” if a ticket is sold and “0” if a ticket is not sold. A seating plan will then be displayed (again use “1” and “0” to indicate whether a ticket for a seat is sold or not respectively.) and the revenue for this flight is also shown. )

So far, i had written a program to scan the numbers into the array and print the numbers inside the array,However i need to input two numbers first to let the program proceed.I had checked online for solutions but i can't find any.Any suggestions or even a better way to do the task will be much appreciated. :D

Voters
SirJamesLongbot
5S-1919
Comments
hotnewtop
5S-1919

I can't see my code here so if you also can't see i will post the code here:

#include <stdio.h>
#include <stdlib.h>

int main()
{
int a=3,b=4;
int i,j,x;

int arry[a];

char *clas[] = {"First class seat","Business class seat","Economy class seat"};