1

How write this c code in pep/8 anyone help I am new to this

#include
using namespace std;
int main(){
int number;
cin>>number;
if(number%2 == 0 ){
cout<<"Even\n"; }
else{ 
cout<<"Odd\n"; }
return 0 ;
}

and thanks in advance :)

mr g
  • 39
  • 1
  • 5

1 Answers1

1

No need i solved it by my self here is the code:

 BR main
   num: .EQUATE 0 
   main: SUBSP 2,i 
   DECI num,s 
   if: LDA num,s 
   ANDA 0x0001,i
   BRNE else
   STRO even_msg,d 
   BR endIf
   else: STRO odd_msg,d 
   endIf: ADDSP 2,i 
   STOP
   odd_msg: .ASCII "The number is: Odd\x00"
   even_msg: .ASCII "The number is: Even\x00"
   .END
mr g
  • 39
  • 1
  • 5