Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- =====================================================
- chapter 4: Loops
- Ex8: Einstain fractions
- =====================================================
- */
- public class MyProgram {
- public static void main(String[] args) {
- int mone=11,mechane;
- float tester;
- int count=1;
- while(mone<100){
- int i=2;
- mechane=mone*i;
- while(mechane<100){
- tester=mechane/mone;
- if( mechane%10!=0 ){
- System.out.println(count + ". " + mone + "/" + mechane);
- count++;
- }
- i++;
- mechane=mone*i;
- }
- mone++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement