I need expert's suggestion's to translate flowchart into pseudo code. When a flowchart is ready how do you write pseudo code for it?
I would show you my work I have created flowchart and written code for it.
I have written below code for flowchart
Does the code I have written below match with the flowchart. I would highly apricate any suggestion's to translate flowchart into pseudo code ?
I would show you my work I have created flowchart and written code for it.
I have written below code for flowchart
C:
//Program in c language
#include<header.h>
#define Power_Button Port1_Pin1
#define SW1 Port1_Pin2
#define SW2 Port1_Pin3
#define SW3 Port1_Pin4
#define Light1 Port2_Pin1
#define Light2 Port2_Pin2
#define Light3 Port2_Pin3
#define Green_Light Port2_Pin4
#define True 1
#define On 1
void main ()
{
while ( True )
{
while( Power_Button == True ) // check power button
Green_Light = On;
if ( SW1 == True ) // if SW1 button pressed, Turn on Light1
Light1 = On
if ( SW2 == True ) // if SW2 button pressed, Turn on Light2
Light2 = On
if ( SW3 == True ) //// if SW3 button pressed, Turn on Light3
Light3 = On
}
}
}