Solução: Problema da caneta do presidenciável
From AdonaiMedrado.Pro.Br
Revision as of 19:09, 18 December 2010 by Adonaimedrado (Talk | contribs)
import java.util.Scanner; public class Caneta { public static void main(String[] args) { Scanner leitor = new Scanner(System.in); int b, p; b = leitor.nextInt(); for(int i = 0; i < b; i++) { p = leitor.nextInt(); if (p%2 == 0) System.out.println("para dentro"); else System.out.println("para fora"); } } }