Skip to content

Instantly share code, notes, and snippets.

@FernandaBernardo
Created March 15, 2013 13:02
Show Gist options
  • Save FernandaBernardo/5169742 to your computer and use it in GitHub Desktop.
Save FernandaBernardo/5169742 to your computer and use it in GitHub Desktop.
import java.util.Scanner;
public class OlaMundo{
public static void main (String [] args)
{
Scanner sc = new Scanner (System.in);
System.out.println ("Digite um numero que voce deseja somar");
int x = sc.nextInt();
System.out.println ("Digite outro numero que voce deseja somar");
int y = sc.nextInt();
System.out.println ("O resultado da soma eh " + (x+y));
//int corinthians = 1910;
/*int corinthians = sc.nextInt();
System.out.println ("O Corinthians foi fundado em " + corinthians
+". Entretanto, o Palmeiras e o melhor \n" );
int macarrao = corinthians % 2;
if (macarrao == 1)
{
System.out.println("o numero" + corinthians + "e impar");
}
else{
System.out.println("ela nao deixou copiar, to de mau, mas e par u.u");
}
System.out.println("Voce eh bixo?");
String bixo = sc.next();
if (bixo.equals ("sim")) System.out.println ("Parabens");
else if (bixo.equals ("nao")) System.out.println ("Rodou");
else System.out.println("faz cursinho de novo");
*/
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment