Why does it read two lines instead of one

Why does the console ignore the first response, makes a new line, and then it reads from that new line....
Console.WriteLine("Hello, welcome to the world of Kroz. My name is SaIDOS.\nAnd no, I'm not a brother of GlaDOS. Please type in your name.");
Console.Write("\nPlease input a statement: ");
string PlayerName = Console.ReadLine();
if (Console.ReadLine() == "Derrick")
Console.WriteLine("Well, " + PlayerName + " , Are you ready for an epic adveture");
string Answer = Console.ReadLine();
if (affirmative.Contains(Answer.ToLower()))
Console.WriteLine("You died");
Console.ReadLine();
else if(negative.Contains(Answer.ToLower()))
Console.WriteLine("You Died");
Console.ReadLine();

Here:
if (Console.ReadLine() == "Derrick")
You are telling the program to read another line, try changing it to:
if (PlayerName == "Derrick")
Additionally, anywhere that you aren't actually reading input, such as in:
Console.WriteLine("Well, " + PlayerName + " , Are you ready for an epic adveture");
string Answer = Console.ReadLine();
You should probably using ReadKey, such as:
Console.WriteLine("Well, " + PlayerName + " , Are you ready for an epic adveture");
string Answer = Console.ReadKey();
It would be greatly appreciated if you would mark any helpful entries as helpful and if the entry answers your question, please mark it with the Answer link.

Similar Messages

  • When typing an email, when I go to next line, it skips two lines instead of one line. How do I correct it?

    I was typing an email and when I would go to the next line, it will skip two lines instead of one line. How do I correct the problem?

    I am not sure I understand the problem. Could you include a screenshot of it right after it happens?
    If you need help to create a screenshot, please see [[How do I create a screenshot of my problem?]]
    Once you've done this, attach the saved screenshot file to your forum post by clicking the '''Browse...''' button below the ''Post your reply'' box. This will help us to visualize the problem.
    Thank you!

  • How to display mapviewer labels in two lines instead of one?

    Hi,
    I have been using the addJDBCTheme to display the map along with the labels as follows:
    mapviewer.addJDBCTheme("aaa","a", "SELECT geom, col1 || ':' || col2 label_value from table_name","GEOM","","styleName","label_value","T.ROAD NAME" ,false);
    So the label is displayed as col1Value:col2Value.
    Now I need to display the label as follows:
    col1Value
    col2Value
    I tried using this
    mapviewer.addJDBCTheme("aaa","a", "SELECT geom, col1 || chr(10) || col2 label_value from table_name","GEOM","","styleName","label_value","T.ROAD NAME" ,false);
    But it doesnt work. This displays col1Valuecol2Value
    So I tried using this:
    mapviewer.addJDBCTheme("aaa","a", "SELECT geom, col1 label_value from table_name UNION ALL SELECT geom, col2 label_value from table_name","GEOM","","styleName","label_value","T.ROAD NAME" ,false);
    This actually works. Meaning it displays the label in two lines. But the two lines are almost attached together, there is no space between them at all. It is sometimes very difficult to read.
    Would really appreciate any suggestions to resolve this issue.
    Is there any other solution to display a label in two lines? I tried changing the label style to set the line-height. But that does'nt work either.
    Lakshmi

    Multiline label aren't supported as yet.
    JayantDoes MapViewer 10.1.3 (the latest version for present) support it?

  • Why does acrobat reader crash upon opening in iMac os 10.10.1

    why does acrobat reader crash upon opening in iMac os 10.10.1

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Step 1
    For this step, the title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    In the top right corner of the Console window, there's a search box labeled Filter. Initially the words "String Matching" are shown in that box. Enter the name of the crashed application or process. For example, if Safari crashed, you would enter "Safari" (without the quotes.)
    Each message in the log begins with the date and time when it was entered. Select the messages from the time of the last crash, if any. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    ☞ The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    ☞ Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, select
              DIAGNOSTIC AND USAGE INFORMATION ▹ User Diagnostic Reports
    (not Diagnostic and Usage Messages) from the log list on the left. There is a disclosure triangle to the left of the list item. If the triangle is pointing to the right, click it so that it points down. You'll see a list of crash reports. The name of each report starts with the name of the process, and ends with ".crash". Select the most recent report related to the process in question. The contents of the report will appear on the right. Use copy and paste to post the entire contents—the text, not a screenshot.
    I know the report is long, maybe several hundred lines. Please post all of it anyway.
    If you don't see any reports listed, but you know there was a crash, you may have chosen Diagnostic and Usage Messages from the log list. Choose DIAGNOSTIC AND USAGE INFORMATION instead.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post other kinds of diagnostic report—they're very long and rarely helpful.

  • HT3529 why does my email show up instead of my number

    why does my email show up instead of my number? when im using imessage..

    Try going to Settings>Messages>Receive At>Caller ID, if your email address is select here select your phone number instead.

  • Why does Mail send two copies of my emails?

    Why does Mail send two copies of my emails?
    Thank you.

    I'm experiencing this issue also. Just one user where I work, Mail in 10.9.3 and Office 365. In-house users only receiving duplicate messages, i.e. the same message twice. Any idea why or how to fix this?

  • Why does my real name appear instead of my screen name?

    Why does my real name appear instead of my screen name?

    It only appears for you when your signed into the forum.
    (nobody else but you can see your real name)
    more info:
    Real name instead of Screen name displayed
    This is what i see:

  • Why does EJB needs two interface???

    Hi All,
    This has been asked by many ppl and many of you might be having
    the correct answer for it. Please tell me....
    Why does EJB needs two interface (Home and Remote Interface)?. Why not one?
    Thanx to all...
    Regards
    GoodieGuy

    Hi Goodie ,
    Its good question and its a very valid one , one has to have doubt
    why two , why not one ..
    Here the answer goes ..
    First of all you need to understand that its a distributed computing technique ie I mean lot of people will be accessing the bean at the same time , right ? OK , you cann't access the bean directly.
    and lastly the stateless and entity beans do instance pooling.
    The very purpose of having two interfaces is
    1) To differnentiate the bussiness logic and life cycle methods .
    2) The home interface inititates life cycle methods like creation , destruction etc .
    3) There are lot of beans in the container , and through home you are
    creating the instance or accessing one of them .
    4) Once you have home object using it we get the remote object ie the instance of the bean that you want to access if stateless any bean can be called , if statefull depending upon the parameter in create method that respective bean is created and invoked .
    In ejb 1.0 and 1.1 even though the bean and the client are in same jvm its assumed that they are remote and in 2.0 Ver we have local this is to avoid network traffic .
    Hope you have got the answer , but if u still need clarification
    read EBRoman book first and second chapters thoroughly and then proceed
    a head.
    Bye
    Mahesh L.
    ============

  • Why does the reading list appear blank sometimes

    why does the reading list appear blank sometimes  when using safari moutainlion  10.8.2

    See this.
    http://docs.info.apple.com/article.html?artnum=60945

  • Why does Adobe Reader change my icons to pdf?

    Why does Adobe Reader change my icons to pdf?

    For the "why", you'd have to ask Adobe. If you are looking for a solution, this may be helpful:
    http://helpx.adobe.com/acrobat/kb/application-file-icons-change-acroba t.html

  • Why does Adobe Reader do not print in English on my computer ?

    I go a e-mail from honeywell company with an attachment.  Why does Adobe Reader transform the e-mail from English to some other languge?

    Hi Margaret,
    I'd like to help! Would you mind sharing a bit more detail? What language does it appear to be? Has this happened with other PDF's? When you installed it - did you select English as the language?
    Looking forward to your response.
    Kind regards, Stacy

  • Why does Adobe Reader window open When i click on "about windows Media Player" , then click  on "Tec

    why does Adobe Reader window open When i click on "about windows Media Player" , then click  on "Technical support information". if the file isnt a PDF file then why is Adobe Reader even summoned?

    i looked at Adobe file extensions first and didnt find htm among the ones listed. but then i looked at file extensions and what program is assigned to open htm and sure enough Adobe was assigned to it. i changed it. thank you.

  • Why does Adobe Reader use the scroll wheel to zoom in/out now, rather than actually scroll?

    Why does Adobe Reader use the scroll wheel to zoom in/out rather than actually, um, scroll? I can't find anywhere to change this function in Preferences, either.

    I had the same problem on my Windows 8 touch screen laptop.  It was driving me crazy! Every time I tried to scroll a page down, the program would zoom the page!  Made reading an ebook difficult.
    I finally found the solution:
    Under Edit select Preferences - General
    Uncheck "Make Hand Tool Use mouse-wheel zooming". 

  • Obiee 11.1.1.6.6 - analysis displays two dates instead of one prompted

    Hi all,
    my analysis somehow displays two dates instead of one prompted.
    How can it be?
    Tell me please what additional information should I include for you to help me.
    obiee 11.1.1.6.6
    Upd: prompt screenshots
    http://marchello.ccx-grads.org/img/BI_prompt_001.png
    http://marchello.ccx-grads.org/img/BI_prompt_002.png

    This is from "Administration" -> "Manage Sessions" section of obiee
    1) everything seems fine, WHERE clause shows correct date
    SET VARIABLE QUERY_SRC_CD='Report',SAW_SRC_PATH='/shared/VB/8.RB-213.BI.1';SELECT
       0 s_0,
       "VB"."VBIREP8"."AASYSDATE" s_1,
       "VB"."VBIREP8"."ADAY" s_2,
       "VB"."VBIREP8"."AMONTH" s_3,
       "VB"."VBIREP8"."ARCDATE" s_4,
       "VB"."VBIREP8"."AYEAR" s_5,
       "VB"."VBIREP8"."CONTRAGENTID" s_6,
       "VB"."VBIREP8"."CONTRAGENTNAME" s_7,
       "VB"."VBIREP8"."CREDITS" s_8,
       "VB"."VBIREP8"."DEPOSITARY" s_9,
       "VB"."VBIREP8"."DEPOSITS" s_10,
       "VB"."VBIREP8"."IDENTIFYCODE" s_11,
       "VB"."VBIREP8"."OVERDAY30" s_12,
       "VB"."VBIREP8"."RESTRUCTURED" s_13,
       "VB"."VBIREP8"."SEGMENT" s_14,
       "VB"."VBIREP8"."STATUS" s_15,
       "VB"."VBIREP8"."TOBO" s_16
    FROM "VB"
    WHERE
    (CAST("VBIREP8"."ARCDATE" AS DATE) = date '2013-08-15')
    ORDER BY 1, 3 ASC NULLS LAST, 4 ASC NULLS LAST, 6 ASC NULLS LAST, 5 ASC NULLS LAST, 7 ASC NULLS LAST, 8 ASC NULLS LAST, 12 ASC NULLS LAST, 15 ASC NULLS LAST, 16 ASC NULLS LAST, 9 ASC NULLS LAST, 14 ASC NULLS LAST, 13 ASC NULLS LAST, 11 ASC NULLS LAST, 10 ASC NULLS LAST, 17 ASC NULLS LAST, 2 ASC NULLS LAST
    FETCH FIRST 100000001 ROWS ONLY
    2) and now attention, I press "next rows" arrow, my WHERE clause is simply ABSENT! 
    SET VARIABLE QUERY_SRC_CD='Report',SAW_SRC_PATH='/shared/VB/8.RB-213.BI.1';SELECT
       0 s_0,
       "VB"."VBIREP8"."AASYSDATE" s_1,
       "VB"."VBIREP8"."ADAY" s_2,
       "VB"."VBIREP8"."AMONTH" s_3,
       "VB"."VBIREP8"."ARCDATE" s_4,
       "VB"."VBIREP8"."AYEAR" s_5,
       "VB"."VBIREP8"."CONTRAGENTID" s_6,
       "VB"."VBIREP8"."CONTRAGENTNAME" s_7,
       "VB"."VBIREP8"."CREDITS" s_8,
       "VB"."VBIREP8"."DEPOSITARY" s_9,
       "VB"."VBIREP8"."DEPOSITS" s_10,
       "VB"."VBIREP8"."IDENTIFYCODE" s_11,
       "VB"."VBIREP8"."OVERDAY30" s_12,
       "VB"."VBIREP8"."RESTRUCTURED" s_13,
       "VB"."VBIREP8"."SEGMENT" s_14,
       "VB"."VBIREP8"."STATUS" s_15,
       "VB"."VBIREP8"."TOBO" s_16
    FROM "VB"
    ORDER BY 1, 3 ASC NULLS LAST, 4 ASC NULLS LAST, 6 ASC NULLS LAST, 5 ASC NULLS LAST, 7 ASC NULLS LAST, 8 ASC NULLS LAST, 12 ASC NULLS LAST, 15 ASC NULLS LAST, 16 ASC NULLS LAST, 9 ASC NULLS LAST, 14 ASC NULLS LAST, 13 ASC NULLS LAST, 11 ASC NULLS LAST, 10 ASC NULLS LAST, 17 ASC NULLS LAST, 2 ASC NULLS LAST
    FETCH FIRST 100000001 ROWS ONLY
    Sure, I receive another date (01.02.2013). Just one thing is strange here - why do I receive only one extra date (I should receive ALL dates in Oracle table when I perform query without any WHERE clause).

  • Producedure givng two rows instead of one row

    Hi
    Please find below my procedure..when I execute this proc...displays two rows instead of one row. Please help me incase if I did mistake.
    CREATE PROCEDURE SP_CWCTravel_Cruise_Amenities_S(
            @Cruise_Line_Code varchar(2500) = NULL,
            @Ship_Code varchar(2500) = NULL,
            @Sail_Id varchar(100) = NULL,
            @Base_Price decimal(8, 2),
            @Category_Groups varchar(2500) = NULL,
            @Categories varchar(2500) = NULL,
            @Rate_Codes varchar(2500) = NULL,
            @Booking_Date VARCHAR( 10 ),
            @Sail_Start_Date VARCHAR( 10 )
    AS
    BEGIN
        SELECT  TOP 1 *
        FROM CWCTravel_Cruise_Amenities_Definition as cad
                                    JOIN CWCTravel_Cruise_Amenities_Definition_Date_Range AS caddr
                                    ON cad.id = caddr.Amenities_Definition_Id
        WHERE Cruise_Line_Code in (SELECT item FROM SF_CWCTravel_GetStrTableFromCommaSeparatedStr(@Cruise_Line_Code))
            AND (Min_Base_Price = 0 OR Min_Base_Price <= @Base_Price)
            AND (Max_Base_Price = 0 OR Max_Base_Price >= @Base_Price)
            AND (Ship_Code IS NULL OR Ship_Code = '' OR Ship_Code IN (SELECT item FROM SF_CWCTravel_GetStrTableFromCommaSeparatedStr(@Ship_Code)))
            AND (Sail_Id IS NULL OR Sail_Id = '' OR Sail_Id IN (SELECT item FROM SF_CWCTravel_GetStrTableFromCommaSeparatedStr(@Sail_Id))) 
            AND (Rate_Codes IS NULL OR Rate_Codes = '' OR ((SELECT COUNT(*) FROM
                                                                                       (SELECT Item FROM dbo.SF_CWCTravel_GetStrTableFromCommaSeparatedStr(@Rate_Codes)) A,
                                                                                       (SELECT REPLACE(REPLACE(Item,'?', '_'), '*', '%') Item FROM dbo.SF_CWCTravel_GetStrTableFromCommaSeparatedStr(Rate_Codes)) B
                                                                                        WHERE A.Item LIKE B.Item) > 0))
                                    AND (Category_Groups IS NULL OR Category_Groups = '' OR ((SELECT COUNT(*) FROM
                                                                                       (SELECT Item FROM dbo.SF_CWCTravel_GetStrTableFromCommaSeparatedStr(@Category_Groups)) A,
                                                                                       (SELECT  Item FROM dbo.SF_CWCTravel_GetStrTableFromCommaSeparatedStr(Category_Groups)) B
                                                                                        WHERE A.Item LIKE B.Item) > 0))
                    AND (Categories IS NULL OR Categories = '' OR ((SELECT COUNT(*) FROM
                                                                                       (SELECT Item FROM dbo.SF_CWCTravel_GetStrTableFromCommaSeparatedStr(@Categories)) A,
                                                                                       (SELECT  Item FROM dbo.SF_CWCTravel_GetStrTableFromCommaSeparatedStr(Categories)) B
                                                                                        WHERE A.Item LIKE B.Item) > 0))
                                    AND  (@Booking_Date is null or @Booking_Date=''
                                                                                                    OR (( caddr.from_date IS NULL OR caddr.from_date <= @Booking_Date ) AND ( caddr.to_date IS NULL OR caddr.to_date >= @Booking_Date )                                                                                   
                                                                                    AND  (( caddr.date_range_type IS NULL ) OR ( caddr.date_range_type = 'BOOK_DATE' ))) )
        union
        SELECT  TOP 1 *
        FROM CWCTravel_Cruise_Amenities_Definition as cad
                                    JOIN CWCTravel_Cruise_Amenities_Definition_Date_Range AS caddr
                                    ON cad.id = caddr.Amenities_Definition_Id
        WHERE Cruise_Line_Code in (SELECT item FROM SF_CWCTravel_GetStrTableFromCommaSeparatedStr(@Cruise_Line_Code))
            AND (Min_Base_Price = 0 OR Min_Base_Price <= @Base_Price)
            AND (Max_Base_Price = 0 OR Max_Base_Price >= @Base_Price)
            AND (Ship_Code IS NULL OR Ship_Code = '' OR Ship_Code IN (SELECT item FROM SF_CWCTravel_GetStrTableFromCommaSeparatedStr(@Ship_Code)))
            AND (Sail_Id IS NULL OR Sail_Id = '' OR Sail_Id IN (SELECT item FROM SF_CWCTravel_GetStrTableFromCommaSeparatedStr(@Sail_Id))) 
            AND (Rate_Codes IS NULL OR Rate_Codes = '' OR ((SELECT COUNT(*) FROM
                                                                                       (SELECT Item FROM dbo.SF_CWCTravel_GetStrTableFromCommaSeparatedStr(@Rate_Codes)) A,
                                                                                       (SELECT REPLACE(REPLACE(Item,'?', '_'), '*', '%') Item FROM dbo.SF_CWCTravel_GetStrTableFromCommaSeparatedStr(Rate_Codes)) B
                                                                                        WHERE A.Item LIKE B.Item) > 0))
                                    AND (Category_Groups IS NULL OR Category_Groups = '' OR ((SELECT COUNT(*) FROM
                                                                                       (SELECT Item FROM dbo.SF_CWCTravel_GetStrTableFromCommaSeparatedStr(@Category_Groups)) A,
                                                                                       (SELECT  Item FROM dbo.SF_CWCTravel_GetStrTableFromCommaSeparatedStr(Category_Groups)) B
                                                                                        WHERE A.Item LIKE B.Item) > 0))
                    AND (Categories IS NULL OR Categories = '' OR ((SELECT COUNT(*) FROM
                                                                                       (SELECT Item FROM dbo.SF_CWCTravel_GetStrTableFromCommaSeparatedStr(@Categories)) A,
                                                                                       (SELECT  Item FROM dbo.SF_CWCTravel_GetStrTableFromCommaSeparatedStr(Categories)) B
                                                                                        WHERE A.Item LIKE B.Item) > 0))
            AND  (@Sail_Start_Date is null or @Sail_Start_Date=''
                                                                                                    OR (( caddr.from_date IS NULL OR caddr.from_date <= @Sail_Start_Date ) AND ( caddr.to_date IS NULL OR caddr.to_date >= @Sail_Start_Date )                                                                                   
                                                                                    AND  (( caddr.date_range_type IS NULL ) OR ( caddr.date_range_type = 'TRAVEL_DATE' ))) )                                                                        
        ORDER BY Cruise_Line_Code DESC, Ship_Code DESC, Sail_Id DESC, Rate_Codes DESC, Category_Groups DESC, Categories DESC
    ENDWhile executing this SP
    I am getting the following results.
    2043 23-07-2010 AM 11:22:10 23-08-2011 PM 04:57:19 8 princess caribbeanPrincess 2043 20-08-2011 AM 12:00:00 30-11-2011 AM 12:00:00 BOOK_DATE
    2043 23-07-2010 AM 11:22:10 23-08-2011 PM 04:57:19 8 princess caribbeanPrincess 2043 01-10-2011 AM 12:00:00 30-11-2011 AM 12:00:00 TRAVEL_DATE
    I need only the first record.
    Thanks in adv
    Rekha

    871270 wrote:
    Hi
    Please find below my procedure..when I execute this proc...displays two rows instead of one row. Please help me incase if I did mistake.Seriously?
    You wrote a query against tables we've never seen, containing data we can't possibly have any idea about and you expect us to be able to help you?
    Please go discuss this with someone in your organization who understands the data model and have them explain to you how it is supposed to work.
    Put yourself in our situation (forum volunteers) ... if we threw some arbitrary code with no explanation as to what it does, what the data model looks like and what's supposed to be happening, do you think you'd be very successful ?

Maybe you are looking for

  • Just paid & subscribed to Lightroom + PS... I click on the welcome download button and all I get is

    "There is no application set to open the URL aam://SAPCode=LTRM?productVersion=5.4?passPhrase=QDhP+te/HB8vPev6KdObv8fvv6baY8dMETvfdSrZ pe6L5yI5zB52p1JS4sksRVp8ogYYkpS+6VRWWc1ejDXB35D1uhn/hZp/xJjUY+Ui5JeXEgf75tY+7Jq/RZ9Tturkgd j7MEQ7kPPuh7+ibvsEFBNLoF

  • Flashback in dataguard environment

    Hi, We have dataguard environment with Sun OS & Oracle 10g, 11g. Now we want to enable flashback for the primary database as well as standby database (physical standby). NO RMAN. I did manage to configure the flashback for the primary database but co

  • Missing Files after updating Premier Pro

    I updated Premier Pro CC on my new imac last night. I opened a project that I was working on yesterday before the update and  some footage in the Timeline has been replaced by different (incorrect files, not what i placed there yesterday, before the

  • I cant turn on the computer

    The computer froze during an ichat. We shut down thew computer and now it will not power up again. The charging light is on when plugged in. Ideas? 

  • Incompatibility issues with the new flash pplayer

    Ever since I installed the new version of flash 11.5 I have had major issues with watching video etc. I am also into astronomy. Myself and many others have paid a lot of money to use Sloohs robotic telescopes in their canary islands observatory. I no