Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. import java.io*;
  2. class problmeaUnu{
  3. public static viod main(String args[]){
  4. int contor=0;
  5. try{ FileReader fr=new FileReader("raport.txt");
  6. for(;;){
  7. int cod=fr.read();
  8. if(cod==-1)break;
  9. if((char)cod==1||(char)=='3'||(char)=='5'||(char)=='7') contor++;}
  10. catch(IOException e){e.print Stack Trace();
  11. System.exit(1);}
  12. System.out.println(contor);
  13.  
  14.  
  15. }}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement