Challenge

Project 2 - Implement the Code for controlling the retraction and extension of Airplane’s landing gear

#include<stdio.h>

static volatile int pressure;

static volatile int output;

void Init_Landing _gear()

{

pressure = 0;

output = 0;

printf("Landing_gear is initialized and program is in state_A & value of output is %d\n", ouput);

}

void state_B()

{

output = 1;

printf("program is in state _B and value of output is %d\n", output);

}

void state_A(){

output = 0;

printf("program is in state_A and value of output is %d\n", output);

}

int main()

{

Init_Landing_gear();

while(1){

switch(valv){

case 1: state_B();

break;

case 2: state_A();

break;

default : break;

}

clock++;

printf("pressure value is : %d\n", pressure);

}

}

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.