飞机加油程序代码飞机加油程序代码
#include #include
using namespace std; struct aircraft
{
char planenumber;
char planetype;
int currenttime;
int handovertime; };
aircraft a[10];
struct wait
{
int rear;
aircraft a[10];
};
struct fuel
{
int top;
aircraft a[10];
};
radio
#...
飞机加油程序代码
#include
#include
using namespace std; struct aircraft
{
char planenumber;
char planetype;
int currenttime;
int handovertime; };
aircraft a[10];
struct wait
{
int rear;
aircraft a[10];
};
struct fuel
{
int top;
aircraft a[10];
};
radio
#include #include
using namespace std; struct aircraft
{
char planenumber[10];
char planetype[4];
string currenttime;
string handovertime; };
void radio(aircraft a[],int n)
{
for(int i=0;i>a[i].planenumber;
cout<<"enter the plane type:"<>a[i].planetype;
cout<<"enter the current time:"<>a[i].currenttime;
cout<<"enter the handovertime:"<>a[i].handovertime;
cout<
#include
using namespace std; struct aircraft
{
char planenumber;
char planetype;
int currenttime;
int handovertime;
};
aircraft a[10];
struct fuel
{
int top;
int a[10];
};
void init(struct fuel * a_fuel)
{
a_fuel->top=0;
}
int isempty(struct fuel a_fuel) {
if(a_fuel.top<=0)
return true;
else
return false;
}
int isfull(struct fuel a_fuel) {
if(a_fuel.top<10)
return false;
else
return true;
}
void push(struct fuel * a_fuel,int aircraft)
{
a_fuel->a[a_fuel->top]=aircraft;
a_fuel->top++;
}
int pop(struct fuel * a_fuel) {
a_fuel->top--;
return a_fuel->a[a_fuel->top]; }
void showstack(struct fuel a_fuel) {
int i;
cout<<"value of top is:"< #include using namespace std; struct aircraft
{
char planenumber;
char planetype;
int currenttime;
int handovertime; };
aircraft a[10];
struct queue
{
int tail;
int a[10];
};
void initq(struct queue * a_queue)
{
a_queue->tail=0; }
int isemptye(struct queue a_queue)
{
if(a_queue.tail<=0)
return true;
else
return false;
}
int isfull(struct queue a_queue)
{
if(a_queue.tail<10)
return false;
else
return true;
}
void add(struct queue * a_queue,int aircraft)
{
a_queue->a[a_queue->tail]=aircraft;
a_queue->tail++;
}
void remove(struct queue * a_queue) {
struct fuel
{
int top;
int a[10]};
void init(struct fuel * a_fuel) {
a_fuel->top=0;
}
int isempty(struct fuel a_fuel) {
if(a_fuel.top<=0)
return true;
else
return false;
}
int isfull(struct fuel a_fuel) {
if(a_fuel.top<10)
return false;
else
return true;
}
void push(struct fuel * a_fuel,int aircraft)
{
a_fuel->a[a_fuel->top]=aircraft;
a_fuel->top++;
}
int pop(struct fuel * a_fuel) {
a_fuel->top--;
return a_fuel->a[a_fuel->top]; }
void showstack(struct fuel a_fuel)
{
int i;
cout<<"value of top is:"<
本文档为【飞机加油程序代码】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑,
图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。