Bem segue o codigo corrigido, de uma olhada.
Um abraco.
Anderson Andrei De Bona
[EMAIL PROTECTED]
/**************************************************************************
import java.io.*;
import java.io.InputStream;
public class Bissexto {
public static void main (String args[]) {
DataInputStream dis = new DataInputStream(System.in);
String anoString = null;
int ano;
System.out.print("Digite o ano: ");
System.out.flush();
try {
anoString = dis.readLine();
ano = Integer.parseInt(anoString);
System.out.print("O ano de " + ano);
if ((( ano / 4 == 0) && (ano / 100 != 0)) || (ano / 400 == 0)) {
System.out.println(" ? bissexto!");
} else{
System.out.println("nao ' bissexto!");}
} catch (Exception e) {
System.out.println("Erro!!!");
System.exit(1);
}
}
}
/**************************************************************************
Sebasti�o Paulo Framartino Bezerra <[EMAIL PROTECTED]> em
10/08/2000 12:16:16
Para: <[EMAIL PROTECTED]>
cc:
Assunto: Biblioteca Java Essa mensagem foi rastreada contra v�rus.
�Bom dia,
�Tenho a vers�o jdk.1.3
�E gostaria de saber�qual a causa do erro nesse programa.
import java.io.*;
public class Bissexto {
��� public static void main (String args[])
DataInputStream dis = DataInputStream(System.in);
������� String anoString = null;
������� int ano;
������� System.out.print("Digite o ano: ");
������� System.out.flush();
������� try
����������� anoString = dis.readLine();
����������� ano = Integer.parseInt(anoString);
����������� System.out.print("O ano de " + ano);
����������� if ((( ano / 4 == 0) && (ano / 100 != 0)) ||
���������������� (ano / 400 == 0))
��������������� System.out.println(" � bissexto!");
����������� } else
��������������� System.out.println(" n�o � bissexto!");
������� } catch (Exception e)
����������� System.out.println("Erro!!!");
����������� System.exit(1);
��� }
}
� O erro acontece em��� �java.io.DataInputStream
�Se algu�m puder me ajudar.
�Desde j� agrade�o.
|--------------------------------------------------------------------------|
| |
| [IMAGE]� Faculdade de Medicina de Ribeir�o Preto -� USP |
| |
|--------------------------------------------------------------------------|
| |
| [IMAGE]� Sebasti�o Paulo Framartino Bezerra |
| |
|--------------------------------------------------------------------------|
| |
| E_mail: [EMAIL PROTECTED] |
| |
|--------------------------------------------------------------------------|
| |
| Home_Page: http://143.107.204.233/ |
| |
|--------------------------------------------------------------------------|
(See attached file: Brasaoef.gif)
(See attached file: Image8.gif)
Compuserve GIF
Compuserve GIF