Advertisement
lope3x

fliper

Jun 28th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class flipper{
  4.    public static void main(String[]args){
  5.       Scanner leia = new Scanner(System.in);
  6.       int p = leia.nextInt();
  7.       int r = leia.nextInt();
  8.       char resultado;
  9.       if(p==0)resultado='c';
  10.       else{
  11.          if(r==0){
  12.             resultado = 'b';
  13.          }
  14.          else{
  15.             resultado = 'a';
  16.          }
  17.       }
  18.       System.out.println(resultado);
  19.    }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement