how can i code this

player1=rock
player2= paper

player two wins

please help me

how to code this one?

DEFINE FUNCTION GetInput( Input Text as string ) returns character
..declare result as character value ' '
..LOOP WHILE ( result is no R S or P )
....output (text) (Rock, Scissors, Paper)
....input result
..END LOOP
..return result
END FUNCTION

MAIN ENTRY POINT
..declare Player1 as character value ' '
..declare Player2 as character value ' '
..Player1 = GetInput("Player 1")
..CLEAR SCREEN
..Player2 = GetInput("Player 2")
..CLEAR SCREEN
..IF( ( Player1 is Paper ) AND (Player2 is Rock) ) THEN output Paper covers Rock, Player 1 wins!
..ELSE IF( ( Player1 is Rock) AND (Player2 is Scissors) ) THEN output Rock breaks scissors, Player 1 wins!
..ELSE IF( ( Player1 is Scissors) AND (Player2 is Paper) ) THEN output Scissors cuts paper, Player 1 wins!
..ELSE IF( ( Player2 is Paper ) AND (Player1 is Rock) ) THEN output Paper covers Rock, Player 2 wins!
..ELSE IF( ( Player2 is Rock) AND (Player1 is Scissors) ) THEN output Rock breaks scissors, Player 2 wins!
..ELSE IF( ( Player2 is Scissors) AND (Player1 is Paper) ) THEN output Scissors cuts paper, Player 2 wins!
..ELSE output Its a Draw!
END MAIN

:icon_rolleyes:

If you don't know C, you can't. Isn't that obvious?

Search for a C tutorial and start learning..

i just need it for my sister
she cant understand how to code it into c

can you code it sir for me?
please sir..

anyone can help me?

You are asking for help. However, what you want is different from help. You want someone to write the program for you.
This forum is not for that.

This article has been dead for over six months. Start a new discussion instead.