Answering Yes or No in C++...using only stdio.h and
conio.h..........help me please...?


here's must be the output of the program:

Screen A

Exam No. items Score
1 20 20
2 35 35

Another Entry? [Y] or [N] :



Screen B:

Record No. Student's Name:
1 Fernando Torres
2 Chuck Norris


Note: if you press Y, the program must repeat the procedure
in screen A, then if N, the program must proceed to the
screen B....Please Help me out............



Answering Yes or No in C++...using only stdio.h and conio.h..........help me please...? here&..

Answer / nipun

You can use while loop for this. Insert your code for screen
A in the while loop and just let it run if the user enters
a 'Y' and if the user choses 'N' then go to screen B out of
the loop

Or
you can use label:
ex:
main()
{
code....
......

label:
code for screen A...
......
......
printf("Another Entry? [Y] or [N] :");
scanf("%s", &op);
if(choice=='y' || choice=='Y')
{
goto label;
}
}

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C C++ Errors Interview Questions

I'm having trouble with coming up with the correct code. Do I need to put a loop? Please let me know if I'm on the right track and what areas I need to correct. I still don't have a good grasp on this programming stuff. Thanks =) The assignment was to write a program using string functions that accepts a coded value of an item and displays its equivalent tag price. The base of the keys: 0 1 2 3 4 5 6 7 8 9 X C O M P U T E R S Sample I/O Dialogue: Enter coded value: TR.XX Tag Price : 68.00

3 Answers   UCB,


How to upgrade LOOP environment, I just mean, how can i make loop statement editable ? I just try some program using loop statement and checking it in multiple compilers. Every compiler showing different output, what's the wrong ? is it a compiler based problem, or loop based problem, tell me why ? and what will be the debugging process, for this kind of problem ?

1 Answers  


what are the techniques for reducing the fragility of a memory bug?

1 Answers  


what is macro in c? Difference between single linked list & double linked list what is fifo & lifo? what is stack & queue?

2 Answers   TCS,


Given that two int variables, total and amount, have been declared, write a loop that reads integers into amount and adds all the non-negative values into total. The loop terminates when a value less than 0 is read into amount. Don't forget to initialize total to 0. Instructor's notes: This problem requires either a while or a do-while loop.

3 Answers  






who was the present cheif governor of reserve bank of india

6 Answers   State Bank Of India SBI,


Why are memory errors hard to debug?

1 Answers  


Find the error (2.5*2=5) (a) X=y=z=0.5,2.0-5.75 (b) s=15;

3 Answers  


char* f() return "hello:"; void main() {char *str=f(); }

1 Answers  


Write a program to accept two strings of Odd lengths. Then take all odd characters from one string and even characters from the other and concatenate and produce a string.

1 Answers  


How to reverse a linked list without using array & -1? Thank you.

2 Answers   Access, Satyam,


Write down the difference between c. Loop and goto statement d. (!0) and (!1) e. (1= =! 1) and (1!=1) f. NULL and !NULL

0 Answers  


Categories