Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Design-concepts-design-patterns goto statement problem. reply fast.

Have Programming Question? Ask it here!
 
 
 


Nikul
goto statement problem. reply fast.
4 Answer(s)      3 years and 6 months ago
Posted in : Design concepts & design patterns


I have done some operation, and want to repeat same operation again at users choice. but its not working properly. I am using goto statement.

void main()

{ float rs, p;

    char z;

clrscr();

    rep :

    printf("\nEnter the value rs");

    scanf("%f",&rs);

    p=rs*100;

    printf("\n\npaisa =%2.f ",p);

    printf("\n do you want to access operation once again? press y/n");

    if(z='y') /* i have check this also by if(z=='y') but its not working. */
        goto  rep;
getch();

}

problem happening is either its repeating again and again.. or its not repeating according to users choice.


Advertisement
View Answers

February 5, 2011 at 9:58 AM


try this...

void main()
{
    float rs,p;
    char z='y';
    clrscr();
  while(z=='y')
   {
    printf("\nEnter the value rs");
    scanf("%f",&rs);
    p=rs*100;
    printf("\n\npaisa =%2.f ",p);
    printf("\n do you want to access operation once again? press y/n");
    scanf("%c",z); 
    }
getch();
}


February 5, 2011 at 10:04 AM


try this...

void main()
{
    float rs,p;
    char z='y';
    clrscr();
  while(z=='y')
   {
    printf("\nEnter the value rs");
    scanf("%f",&rs);
    p=rs*100;
    printf("\n\npaisa =%2.f ",p);
    printf("\n do you want to access operation once again? press y/n");
    scanf("%c",z); 
    }
getch();
}


February 5, 2011 at 10:18 AM


void main()
{
    float rs,p;
    char z;
    clrscr();
rep : ;
    printf("\nEnter the value rs");
    scanf("%f",&rs);
    p=rs*100;
    printf("\n\npaisa =%2.f ",p);
    printf("\n do you want to access operation once again? press y/n");
    if(z=='y') /* i have check this also by if(z=='y') but its not working. */
        goto  rep;
getch();


February 5, 2011 at 1:11 PM


Have a look at the following tutorial:

C goto statement



Related Tutorials/Questions & Answers:
goto statement problem. reply fast.
goto statement problem. reply fast.  I have done some operation... properly. I am using goto statement. void main() { float rs, p; char z...();   Have a look at the following tutorial: C goto statement
GOTO Statement in java
GOTO Statement in java  I have tried many time to use java goto statement but it never works i search from youtube google but e the example on net are also give compile error. if possible please give me some code with example
Advertisements
C Goto Statement
C Goto Statement       This section explains you the concept of 'goto' statement in C.  The goto statement is a jump statement which jumps from one point to another point
fast Reply - Java Beginners
fast Reply  Hi Friend I want to passing value one page to another page without using session varible....please help me write the code and send me   Hi friend, For solving the problem visit to : http
Thanks for fast reply - Java Beginners
Thanks for fast reply  Thanks for response I am already use html for data grid but i m noot understood how to connect to the data base, and how...); con = DriverManager.getConnection(url+db, user, pass); Statement st
PHP Goto
Goto Statement: The goto operator is used to jump to another line or section... inside a loop/switch structure using goto statement. You may jump out of these constructs using goto statement. Example: <?php echo "First
please reply fast if anyone knows that how to install mysql on windows using msi package
please reply fast if anyone knows that how to install mysql on windows using msi package  please reply fast if anyone knows that how to install mysql on windows using msi package   Hello Friend, visit here Thanks
Substitute Of goto
Substitute Of goto  What is substitute of goto(as it can be used in C++) in java? My Code is: for(int Index = 0 ; Index < 100 ; Index... modifiedValue goto Start
Java IF statement problem
Java IF statement problem  Dear Sir/Madam i am using the following code. expected to not have any output but it still showing "welcome".. please help me why it showing "welcome". class c1 { int a=5; while(a>1
struts problem ... need help urgently.. please reply ASAP
struts problem ... need help urgently.. please reply ASAP  Hi Every1, I want to make an application using struts 1.2. I am a beginner on struts... depends on server or IDE. Please reply ASAP. Thanx , am2085
fast view web--yes - Struts
fast view web--yes  How to enable the fast web view--yes on pdf file  Hi Friend, Please clarify your problem. Thanks
for statement
for statement  for(int i=0;i<5;i++); { system.out.println("The value of i is :"+i); } if i end for statement what will be the output   got the answer.. it displays only the last iteration that is "The value of i
reply to the mail
reply to the mail  Hi! which jar file needed to be added? Thanks   Question not clear
reply must
reply must  is it critical to do a software job based on games(java) i know core java & advanced java basics only please give me answer
Reply me - Java Beginners
Reply me  Hi,   Hi Ragini please specify main problem. where are problem in your code. Thanks
fast food restaurant
fast food restaurant  I need to design a Java application to manage a drive-thru restaurant. There are two drive-thru windows to serve customers and a kitchen to prepare the ordered food. Use an random number generator
Reply Me - Java Beginners
Reply Me  Hi Amardeep I am sending database table name,code... "code too large for try statement" please help me its very urgent......   Hi Ragini, I can understand your problem. Today once again try
Reply - Struts
("txtICNAMEOFOCCP" + W); } } Here i got problem...when i debug the code... debug... if you understtod my problem then write the code and send me...its very
Reply Me - Java Beginners
=13c222b87273340cf002bfba4ab9d045. please reply me fast its urgent...Reply Me  Hi All, I want to using query string in my page please write the query string in java script and send me and I have a some link
Plz chk it and reply again - Java Beginners
Plz chk it and reply again  Hi Deepak, Thanks for fast reply,your application is good,u write this code for user click the view database... fast reply.  Hi Ragini, Please specify your requirements
Reply - JSP-Servlet
... Thanks for your fast reply.. Thanks/Regards, R.Ragavendran..  
Reply me - Java Beginners
Reply me  If u r not understood my just posted question plz let me know  Hi Ragini, Please specify your requirements in detail. It would be good for me to provide you the solution if problem is clear. And also
Reply Me - Java Beginners
Reply Me  Hi, Please Help Me using jsp technologies I have... understood my problem then please send me.....  Hi friend, Please specify the problem in details and give full code having the problem. Thanks
Reply me - Java Beginners
Reply me   Hi, I am using this code for session but i am calling admin_home1.jsp then page is going on the admin_home1.jsp but this data... specifies the page name to show the data for solving the problem. For read
Reply Me - Java Beginners
Reply Me  Hi, This is not correct url please send me again coorect url
Reply Me - Java Beginners
Reply Me   Hi I am sending some code please check it and solve this code is only insert into the data base please insert data in the database table and reply me fast...I got two error 1 is catch is without try 2 is try
Reply Me - Java Beginners
Reply Me  Hi, Details structure Using jsp code I m sending table structure and again sending our problem Steps:- 1:-If user input in name text box like a,then display record related to a not b and c(means
Reply me - Java Beginners
Reply me  Hi, this code is .java file but i am working in jsp tchnologies and i wantr this if user input a in text box the table have... con=null; Statement stmt = con.createStatement(); ResultSet
Reply me soon.........
Reply me soon.........  Any body plzz help.....how to get d checked details from previous page to current page and den insert into table
Reply me - Java Beginners
Reply me  Hi Friends, Quest:- Tell em what is the difference between java and php, dotnet Quest:- what is the similar point of php and java... Please tell me its very urgent
reply - Java Beginners
reply  Hi friends I have a 255 fields i want to insert data in the table please let me know how to insert data in the database please reply me its very urgent
Reply Me - Java Beginners
Reply Me  Hi, For table I have a two table first is sales transaction and second is sales_line sales_transaction fields are comp_id,vend... of two table in the main page. r u understood my problem thanks thanks
Reply Me - Java Beginners
Reply Me  Hi, I m working in jsp please any information provide the jsp code.not servlet or any other. I m writing a problem clearly . basically i want to search data(not whole data) from database and display, only
Reply Me - Java Beginners
Reply Me  Hi,.. I have a some fields in one form like security and some more fields this fields maintain the table if user click security... question then reply me
reply - Java Beginners
reply  Hi friend, please send query count the column name in oracle  Hi friend, Code to solve the problem : import java.sql....(); System.out.println("Got Connection."); Statement st = conn.createStatement
Reply Me - Java Beginners
Reply Me  Hi Rajnikant, I know MVC Architecture but how can use this i don't know... please tell me what is the use of this ....and also solve my previous problem.... Thanks   Hello Ragini MVC
Reply Me - Struts
Reply Me  Hi Friends, Please write the code using form element...because i got error in textbox null value  Hi Soniya Would you please explain, in which technology are you creating page? I promise
Reply Me - Struts
Reply Me  Hi Friends, I am new in struts please help me How to arrange the folder using oracle 10g database where store web.xml file,jsp file,connection file....etc please let me know its very urgent  
Reply me - Java Beginners
Reply me  Hi, There are one form product_master these fields are prod_id,prod_name,prod_opstock,prod_excise,prod_vat,reorder_level,reorder_qty,vendor_name All fields are input manualy but i want this vendor_name take
reply me - Java Beginners
reply me  Hi, user enter vend_id in text box ten open the addform.jsp In the addform.jsp have two button Update and delete addform.jsp is display with fetching data in all text box I m sending code before 5
hi plzz reply
hi plzz reply  in our program of Java where we r using the concept of abstraction Plz reply i m trying to learn java ...   means in language of coding we r not using abstraction this will be used only for making ideas
Reply Me - Java Beginners
Reply Me  Hi deepak, your sending web application is good (alphabetical searching dropdown menu) Steps:- 1:-searching is good 2:- user click inser vtton then open the pop-up windows this is write 3
Reply - Java Beginners
Reply  Hi Friends, Thanking for ur continue response I know your giving idea but can u send me the code of this problem just example for 20 data
UMLet - Fast UML Editor
UMLet - Fast UML Editor       UMLet is an open-source UML tool with a simple user interface: draw UML diagrams fast, export diagrams to eps, pdf, jpg, svg
Reply me - Java Beginners
Reply me  HI I m sending structure of table vend_id,vend_name,vend_address,vend_mobile,vend_panno,vend_phone,vend_creditday,vend_tinno this is the table and i want searchning table field using name and display wole
Reply - Java Beginners
Reply  Hi amardeep Thanks for reply i know my code is very large....i am sending database table file please chk sequence and let me know USERCODE NUMBER(10) POSTDATE DATE FORMID VARCHAR2(20) LOCATIONID VARCHAR2(20
Please Reply - Java Beginners
and send me  Hi friend, Code to solve your problem : "vendmaster.jsp
Reply - JSP-Servlet
not be a problem....  Hi friend, i am sending running program
Advertisements
 

 

 

DMCA.com