1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

LOOP PROBLEM-not exiting do while loop

Discussion in 'C' started by drpuja, Aug 1, 2011.

  1. drpuja

    drpuja New Member

    Joined:
    Aug 1, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    if(ch=='L')
    {
    do
    {
    System.out.println("Would u like to buy the Shirt");
    System.out.println("Press 1 - yes , press 0 - no");
    abc = Integer.parseInt(in.readLine());
    count++;
    System.out.println("Tell the amount");
    amt=Double.parseDouble(in.readLine());
    s_amt=s_amt+amt;
    }
    while(abc!=0);
     

Share This Page