Apr26
“This Program will tell if the number you enter is either POSITVE or NEGATIVE ”
private num1,num2,choice
num1=0
num2=0
choice=”Y”
activate screen
clear screen
clear
do while choice=”Y”
set color to G/B
@3,5 say “This Program will tell if the number”
@6,5 say “you enter is either POSITVE or NEGATIVE .”
@9,5 say “Enter any Number : ” get num1
read
num2 = num1 % 2
if num2 =0
@12,3 say “Number you entered is EVEN.”
else
@12,3 say “Number you enterd is ODD.”
endif
@17,4 say “Do you want to try again? (Y/N): ” get choice
read
clear
upper(choice)
num2=0
if upper(choice) =”N”
exit
endif
enddo
Recent Comments