Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io*;
- class problmeaUnu{
- public static viod main(String args[]){
- int contor=0;
- try{ FileReader fr=new FileReader("raport.txt");
- for(;;){
- int cod=fr.read();
- if(cod==-1)break;
- if((char)cod==1||(char)=='3'||(char)=='5'||(char)=='7') contor++;}
- catch(IOException e){e.print Stack Trace();
- System.exit(1);}
- System.out.println(contor);
- }}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement