goto statement problem. reply fast.
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.
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
Ads
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
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
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
Problem Statement : Show Booking System
Problem Statement : Show Booking System Yashwant Rao Chavan Auditorium has few stage shows running currently. Initialize
the Show data by de-serializing a serialized file provided in the Participant_Workspace
of the project
Problem Statement : Show Booking System
Problem Statement : Show Booking System Yashwant Rao Chavan Auditorium has few stage shows running currently.
Now that we have the details of the shows that are currently running, we will book
our tickets using following method
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
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
ModuleNotFoundError: No module named 'goto'
ModuleNotFoundError: No module named '
goto' Hi,
My Python program is throwing following error:
ModuleNotFoundError: No module named '
goto'
How to remove the ModuleNotFoundError: No module named '
goto' error
ModuleNotFoundError: No module named 'goto'
ModuleNotFoundError: No module named '
goto' Hi,
My Python program is throwing following error:
ModuleNotFoundError: No module named '
goto'
How to remove the ModuleNotFoundError: No module named '
goto' error
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
ModuleNotFoundError: No module named 'reply'
ModuleNotFoundError: No module named '
reply' Hi,
My Python program is throwing following error:
ModuleNotFoundError: No module named '
reply'
How to remove the ModuleNotFoundError: No module named '
reply'
ModuleNotFoundError: No module named 'goto-cd'
ModuleNotFoundError: No module named '
goto-cd' Hi,
My Python program is throwing following error:
ModuleNotFoundError: No module named '
goto-cd'
How to remove the ModuleNotFoundError: No module named '
goto-cd
ModuleNotFoundError: No module named 'goto-dir'
ModuleNotFoundError: No module named '
goto-dir' Hi,
My Python... '
goto-dir'
How to remove the ModuleNotFoundError: No module named '
goto-dir... to install padas library.
You can install
goto-dir python with following
ModuleNotFoundError: No module named 'goto-cd'
ModuleNotFoundError: No module named '
goto-cd' Hi,
My Python program is throwing following error:
ModuleNotFoundError: No module named '
goto-cd'
How to remove the ModuleNotFoundError: No module named '
goto-cd
ModuleNotFoundError: No module named 'goto-dir'
ModuleNotFoundError: No module named '
goto-dir' Hi,
My Python... '
goto-dir'
How to remove the ModuleNotFoundError: No module named '
goto-dir... to install padas library.
You can install
goto-dir python with following
ModuleNotFoundError: No module named 'trace-goto'
ModuleNotFoundError: No module named 'trace-
goto' Hi,
My Python... 'trace-
goto'
How to remove the ModuleNotFoundError: No module named 'trace-
goto' error?
Thanks
Hi,
In your python environment you
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
PLease reply its urgent
PLease
reply its urgent Write a java function that has the signature
ΓΆβ?¬Ε?Public static int clock Inter sections(int hours, int minutes)ΓΆβ?¬Β?
That takes a number of hours and minutes (up to several days), and returns
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
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