Java
Maio, 2013
Floriano, PI
1) package program_01; import java.util.Scanner; public class program_01 { public static void main(String[ ] args ) { Scanner lerdado= new Scanner (System.in); System.out.println (“Informe o nome: ” ); string nome=lerdado.next(); System.out.println (“Informe o endereço: ” ); string rua=lerdado.next(); System.out.println (“Informe o CEP: ” ); double cep=lerdado.nextDouble(); System.out.println (“Informe o telefone: ” ); string tel=lerdado.nextDouble(); }}
2) package program_02; import java.util.Scanner; public class program_01 { public static void main(String[] args ) { Scanner lerdado= new Scanner (System.in); System.out.println (“Informe o nome do aluno: ” ) string nome=lerdado.next(); System.out.println (“Informe a primeira nota: ” ); double n1=lerdado.nextDouble(); System.out.println (“Informe a segunda nora: ” ); double n2=lerdado.nextDouble(); System.out.println (“Informe o telefone: ” ); double n3=lerdado.nextDouble(); System.out.println (“Informe o telefone: ” ); double n4=lerdado.nextDouble(); double media=(n1+n2+n3+n4)/4;