All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Why fight? (Posted on 2020-07-08) Difficulty: 3 of 5
If
win*war=enigma
What is the value of gain ?

See The Solution Submitted by Ady TZIDON    
Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
computer soln | Comment 1 of 3

lord@rabbit-3 ~ % gain


win x war = enigma

549 x 537 = 294813, gain = 8349


        program gain

        implicit none

        integer w,i,n,a,r,e,ee,g,m,war,win,enigma,dum,dum1,en(6)

         do 1 w=0,9

          do 2 i=0,9

          if(i.eq.w) go to 2

           do 3 n=0,9

           if(n.eq.i.or.n.eq.w) go to 3

            do 4 a=0,9

            if(a.eq.n.or.a.eq.i.or.a.eq.w) go to 4

             do 5 r=0,9

             if(r.eq.a.or.r.eq.n.or.r.eq.i.or.r.eq.w) go to 5

             win=100*w+10*i+n

             war=100*w+10*a+r

             enigma = win * war

             dum=enigma

                do ee=6,1,-1

                dum1=(dum/10 *10)

                en(ee)=dum-dum1

                dum=dum1/10

                enddo

             if(en(2).ne.n.or.en(3).ne.i.or.en(6).ne.a)go to 5

             e=en(1)

             if(e.eq.w.or.e.eq.i.or.e.eq.n.or.e.eq.a.or.e.eq.r) 

        1    go to 5

             g=en(4)

             if(g.eq.w.or.g.eq.i.or.g.eq.n.or.g.eq.a.or.g.eq.r

        1   .or.g.eq.e) go to 5

             m=en(5)

             if(m.eq.w.or.m.eq.i.or.m.eq.n.or.m.eq.a.or.m.eq.r

        1   .or.m.eq.e.or.m.eq.g) go to 5

             print 777,win,war,enigma,g,a,i,n

777          format('win x war = enigma',/,

        1     i3,' x ',i3,' = ',i6,', gain = ',4i1)

5             enddo

4           enddo

3          enddo

2         enddo

1        enddo

        end

Edited on July 8, 2020, 8:01 pm
  Posted by Steven Lord on 2020-07-08 19:57:19

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information