Thread: Guess What...??

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Apr 2011
    Location
    Karachi, Pakistan
    Posts
    19

    Guess What...??

    Hello there...!!

    I am using a Borland Turbo C 3.0 compiler. I made a quiz programme that asks a GK question. The user is asked a question and given three chances to answer it correctly. For a correct first guess, you score 4 points. For a correct second guess, you score 2 points and for a correct third guess you score 1 point. No point is scored after third chance and the 'default' statement is executed which dispays the correct answer. Here is the programme:
    GUESS.txt
    The problem is that my programme bypasses all the 'switch/cases' and other 'if else' statements and directly jumps to the 'default' statement. I mean even if you type in the correct guess the first time, it always displays the default answer and awards no point.

    Please help me with this. Also I wanted to ask whether 'scanf' takes up 'a string' as input or not and process it for operations such as printing, comparing the input against a value and like purposes......????

    Thanks
    Attached Files Attached Files

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. can u guess my number?
    By hotsox in forum C Programming
    Replies: 2
    Last Post: 01-07-2006, 01:40 PM
  2. can u guess my number?
    By strider496 in forum C Programming
    Replies: 16
    Last Post: 03-22-2005, 10:19 PM