/*
 * Main.java
 *
 * Created on 9 de Maio de 2008, 20:27
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package aula1;

/**
 *
 * @author awolf
 */
public class Main {
    
    /** Creates a new instance of Main */
    public Main() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
        if(5>2){
            System.out.println("Cinco é maior que 2");
        }
        
        if(3>5){
            System.out.println("Tres é maior que 5");
        }
        
        if(10>2){
            System.out.println("Dez é maior que 2");
        }else{
            System.out.println("Dez não é maior que 2");
        }
        
        switch(1){
            case 1:
                System.out.println("Voce escolheu a opcao 1");
                break;
            case 2:
                System.out.println("Voce escolheu a opcao 2");
                break;
            case 3:
                System.out.println("Voce escolheu a opcao 3");
                break;
            default:
                System.out.println("Voce nao escolheu nehuma opcao");
                break;
                
        }
        
        System.out.println(10>2?"Dez é maior que 2":"Dez não é maior que 2");
        
        System.out.println("Exemplo com while");
        int i=0;
        while(i<10){
            System.out.println(i);
            i=i+1;
        }
        
        System.out.println("Exemplo com do ... while");
        
        do{
            System.out.println(i);
            i=i-1;
        }while(i>0);
        
        System.out.println("Exemplo com do for");
        
        for(int x=0; x<100; x=x+1){
            System.out.println(x);
        }
    }
    
}

