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

Home > Logic
Question Quandary (Posted on 2014-04-14) Difficulty: 3 of 5
A history quiz had three questions on presidents of the United States. Here are the answers of six students: Amelia, Barry, Carol, Danny, Eileen and Frank.

Amelia: Eisenhower, Eisenhower, Kennedy.
Barry: Kennedy, Kennedy, Eisenhower.
Carol: Truman, Truman, Eisenhower.
Danny: Kennedy, Eisenhower, Truman.
Eileen: Truman, Kennedy, Kennedy.
Frank: Kennedy, Truman, Truman.

Every student answered at least one question correctly. What are the correct answers?

No Solution Yet Submitted by K Sengupta    
Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution--VB 5.0 Comment 2 of 2 |

Private Sub Form_Load()
  Dim g(6) As String
  a$ = Space$(3)
  g(1) = "EEK"
  g(2) = "KKE"
  g(3) = "TTE"
  g(4) = "KET"
  g(5) = "TKK"
  g(6) = "KTT"
  For p1 = 1 To 3
     Mid(a$, 1, 1) = Mid("TEK", p1, 1)
  For p2 = 1 To 3
     Mid(a$, 2, 1) = Mid("TEK", p2, 1)
  For p3 = 1 To 3
     Mid(a$, 3, 1) = Mid("TEK", p3, 1)
     good = 1
     For person = 1 To 6
      found = 0
      For i = 1 To 3
        If Mid(a$, i, 1) = Mid(g(person), i, 1) Then
          found = 1: Exit For
        End If
      Next
      If found = 0 Then good = 0: Exit For
     Next person
     If good Then Text1.Text = Text1.Text & Chr$(13) & Chr$(10) & a$
  Next
  Next
  Next
End Sub

does find KTK: Kennedy, Truman, Kennedy.


  Posted by Charlie on 2014-04-14 12:33:12
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
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