Hi, this is my full code I removed the code of the frame so I can capture everything. Now, what I want to do is to use "Another? Y/N" (encircled on the second image) when I hit key "Y" or "y" it will prompt the user back to the main menu (first image), and when I hit "N" or "n" it will close the program. Any help will be greatly appreciated.
Hi, this is my full code I removed the code of the frame so I can capture everything. Now, what I want to do is to use "Another? Y/N" (encircled on the second image) when I hit key "Y" or "y" it will prompt the user back to the main menu (first image), and when I hit "N" or "n" it will close the program. Any help will be greatly appreciated.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Hi, this is my full code I removed the code of the frame so I can capture everything. Now, what I want to do is to use "Another? Y/N" (encircled on the second image) when I hit key "Y" or "y" it will prompt the user back to the main menu (first image), and when I hit "N" or "n" it will close the
![* F:\BES 103\payslip\Menu.c - [Executing] - Dev-C++ 5.11
File Edit Search View Project Execute Tools AStyle Window Help
TDM-GCC 4.9.2 64-bit Release
(globals)
Project Classes Debug
[*] Menu.c
I F:\BES 103\payslip\Menu.exe
O X
Hincludecstdio.h>
lincludecconio.h>
Hincludecmath.h>
lincludecwindows.h>
Hincludecstdlib.h>
XXXXXXXXXXXXXX)
(XXXXXXXXX
(XXXXXXXXXXXXXXX
6 E void gotoxy(short x, short y) {
COORD pos = {x, y};
SetConsoleCursorPosition (GetstdHandle(STD_OUTPUT_HANDLE), pos);
|[:]]
|[:]]
|[:]]
|[:]]
|[:)]
|[:]]
|[:]]
|[:]]
|[:)]
|[:]]
|[:]]
|[:)]
[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
[:]]
|[:]]
|[:]
|[:]]XXXXXXXXXXXXXXX
|[:]
|[:]]
|[:]]
[[:]]
|[:]]
|[:]]
|[:]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
КХXXXXXXXXXXXXX| [:]|
|[:]]
9
10
****MENU****
main()
12
14
15
16
int col,ron;
float x,y,2,i,d;
char choi,c;
17
18
[S]
[A]
[I]
[F]
[D]
[T]
[Q]
Speed
systen ("cls");
19
20
Acceleration
gotoxy (55,5);
gotoxy (35,1e); printf("[S]
gotoxy (35,11); printf("Aj
gotoxy (35,12); printt("I]
gotoxy (35,13); printf("iP
gotoxy (35,14); printt("Dj
gotoxy (35,15); printf("ITj
gotoxy (35,16); printt("[Q]
gotoxy (35,22); printf("Enter a KEY for your choice:");
Initial Velocity
Final Velocity
Displacement
Time
21
22
printf("****MENU****");
- Speed");
- Acceleration");
Initial Velocity");
Final Velocity");
- Displacement");
- Time");
Quit");
23
24
25
26
Quit
27
28
29
choi=getche ();
30
31
32
c=toupper (choi);
Switch (c)
33
34 -
case 'S
syster ("cls");
printt("Enter Distance (m):");
scanf ("Xf",8x);
print+("Enter Time (s):");
scanf ("Xf",8y);
35
36
37
Enter a KEY for your choice:
38
39
40
gotoxy (5e,6);
gotoxy (5e,7);
gotoxy (5e,s); printf("Speed = %.ef / %.ef",x,y);
gotoxy (5e, 1e); printt("Speed = %.2f m/s",2);
gotoxy (5e, 11); printt("====== =");
gotoxy (5e, 15); printt("Another? (V/N)");
break;
system ("cls");
printf("Enter Final Velocity (m/s):");
scanf ("Xf",8x);
printi("Enter Time (s):");
scanf ("Xf",8y);
2=x/y;
gotoxy(5e, 6);
gotoxy (5e,7); printt("Acceleration = Final Velocity/Time"):
gotoxy(5e,s); printf("Acceleration = %.ef / %.ef", x, y);
gotoxy (5e, 1e); printf("Acceleration = %.2f m/s2", 2);
gotoxy (se, 11); printf("===========
gotoxy (5e,15); printf("Another? (V/N)");
break;
systen ("cls");
printf("Enter Final Velocity (m/s):");
scanf ("Xf",8x);
printt("Enter Acceleration (m/s^2):");
scanf ("Xf",82);
printf("Enter Time (s):");
scanf("Xf",8y);
printf("= ===**-===");
printt("Speed = Distance/Time");
41
XXXXXXXXXXXXXXXXXXXXXXXXX
42
43
44
45
46
47
48
49
case
'A'
se
51
52
53
54
55
printf("=============:
=============");
56
57
58
===");
59
60
61
case 'I"
62
64
65
66
67
Line: 129
Col: 1
Sel: 0
Lines: 135
Length: 4902
Insert
Done parsing in 0.047 seconds
O Search
DEV
4:08 PM
5/22/2021
SATEDEO](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe7a8d7cc-6354-4a3e-8bc2-1b86b252c4bd%2Fccd4949b-e4ca-453d-b479-a0478adbc433%2Ffav2c8o_processed.png&w=3840&q=75)
Transcribed Image Text:* F:\BES 103\payslip\Menu.c - [Executing] - Dev-C++ 5.11
File Edit Search View Project Execute Tools AStyle Window Help
TDM-GCC 4.9.2 64-bit Release
(globals)
Project Classes Debug
[*] Menu.c
I F:\BES 103\payslip\Menu.exe
O X
Hincludecstdio.h>
lincludecconio.h>
Hincludecmath.h>
lincludecwindows.h>
Hincludecstdlib.h>
XXXXXXXXXXXXXX)
(XXXXXXXXX
(XXXXXXXXXXXXXXX
6 E void gotoxy(short x, short y) {
COORD pos = {x, y};
SetConsoleCursorPosition (GetstdHandle(STD_OUTPUT_HANDLE), pos);
|[:]]
|[:]]
|[:]]
|[:]]
|[:)]
|[:]]
|[:]]
|[:]]
|[:)]
|[:]]
|[:]]
|[:)]
[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
[:]]
|[:]]
|[:]
|[:]]XXXXXXXXXXXXXXX
|[:]
|[:]]
|[:]]
[[:]]
|[:]]
|[:]]
|[:]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
|[:]]
КХXXXXXXXXXXXXX| [:]|
|[:]]
9
10
****MENU****
main()
12
14
15
16
int col,ron;
float x,y,2,i,d;
char choi,c;
17
18
[S]
[A]
[I]
[F]
[D]
[T]
[Q]
Speed
systen ("cls");
19
20
Acceleration
gotoxy (55,5);
gotoxy (35,1e); printf("[S]
gotoxy (35,11); printf("Aj
gotoxy (35,12); printt("I]
gotoxy (35,13); printf("iP
gotoxy (35,14); printt("Dj
gotoxy (35,15); printf("ITj
gotoxy (35,16); printt("[Q]
gotoxy (35,22); printf("Enter a KEY for your choice:");
Initial Velocity
Final Velocity
Displacement
Time
21
22
printf("****MENU****");
- Speed");
- Acceleration");
Initial Velocity");
Final Velocity");
- Displacement");
- Time");
Quit");
23
24
25
26
Quit
27
28
29
choi=getche ();
30
31
32
c=toupper (choi);
Switch (c)
33
34 -
case 'S
syster ("cls");
printt("Enter Distance (m):");
scanf ("Xf",8x);
print+("Enter Time (s):");
scanf ("Xf",8y);
35
36
37
Enter a KEY for your choice:
38
39
40
gotoxy (5e,6);
gotoxy (5e,7);
gotoxy (5e,s); printf("Speed = %.ef / %.ef",x,y);
gotoxy (5e, 1e); printt("Speed = %.2f m/s",2);
gotoxy (5e, 11); printt("====== =");
gotoxy (5e, 15); printt("Another? (V/N)");
break;
system ("cls");
printf("Enter Final Velocity (m/s):");
scanf ("Xf",8x);
printi("Enter Time (s):");
scanf ("Xf",8y);
2=x/y;
gotoxy(5e, 6);
gotoxy (5e,7); printt("Acceleration = Final Velocity/Time"):
gotoxy(5e,s); printf("Acceleration = %.ef / %.ef", x, y);
gotoxy (5e, 1e); printf("Acceleration = %.2f m/s2", 2);
gotoxy (se, 11); printf("===========
gotoxy (5e,15); printf("Another? (V/N)");
break;
systen ("cls");
printf("Enter Final Velocity (m/s):");
scanf ("Xf",8x);
printt("Enter Acceleration (m/s^2):");
scanf ("Xf",82);
printf("Enter Time (s):");
scanf("Xf",8y);
printf("= ===**-===");
printt("Speed = Distance/Time");
41
XXXXXXXXXXXXXXXXXXXXXXXXX
42
43
44
45
46
47
48
49
case
'A'
se
51
52
53
54
55
printf("=============:
=============");
56
57
58
===");
59
60
61
case 'I"
62
64
65
66
67
Line: 129
Col: 1
Sel: 0
Lines: 135
Length: 4902
Insert
Done parsing in 0.047 seconds
O Search
DEV
4:08 PM
5/22/2021
SATEDEO
![* F:\BES 103\payslip\Menu.c - [Executing] - Dev-C++ 5.11
File Edit Search View Project Execute Tools AStyle Window Help
TDM-GCC 4.9.2 64-bit Release
(globals)
Project Classes Debug
[*] Menu.c
printf("Enter Time (s):");
scanf ("Xf",8y);
1=x-(2*y);
gotoxy (4e,6);
gotoxy (4e,7);
gotoxy (4e,s);
gotoxy (4e,1e); printt("Initial Velocity = %.2f m/s",1);
gotoxy (4e,11); printt("========= *
gotoxy (4e,15); print†("Another? (V/N)");
break;
systen ("cls");
printf("Enter Initial Velocity (m/s):");
scanf ("Xf",81);
printt("Enter Acceleration (m/s^2):");
scanf ("Xf",82);
print+("Enter Time (s):");
scanf("Xf",8y);
x=i+(2*y);
gotoxy (4e,6);
gotoxy (4e,7);
gotoxy (4e,5); printf("Final Velocity = %.ef + (3.ef • 1.ef)",1,2,y);
gotoxy (4e, 1e); printt("Final Velocity = %.24 m/s",x);
gotoxy (4e,11); printt("======
gotoxy (4e, 15); printf("Another? (V/N)");
break;
systen ("cls");
printf("Enter Initial Velocity (m/s):");
scant ("Xf",81);
printi("Enter Acceleration (m/s^2):");
scanf ("Xf",82);
print+("Enter Time (s):");
scant ("Xf",&y);
d=i*y+e.5*2*y*y;
gotoxy (3e,6); print+("======
gotoxy (3e,7);
gotoxy (3e,5); print+("Displacement = (x.ef)(%.ef)+1/2(%.ef)(x.ef^2)",i,y, 2,y);
gotoxy (3e, 1e); printf("Displacement = %.2f m",d);
gotoxy (3e,11); printt("====
gotoxy (3e,15); printf("Another? (Y/N)");
break;
systen ("cls");
printt("Enter Final Velocity (m/s):");
scanf ("Xf",8x);
printt("Enter Initial Velocity (m/s):");
scanf ("Xf",81);
print+("Enter Acceleration (m/s^2):");
scanf ("%f",82);
y=(x-1)/2;
gotoxy (34,6);
gotoxy (3e,7);
gotoxy (3e,9);
gotoxy (3e,1e); printt("Tine = %.2f s",y);
gotoxy (3e,11); printf("= ==
gotoxy (3e,15); print+("Another? (Y/N)");
break;
systen ("cls");
exit (e);
systen ("cls");
gotoxy(5e, 2);
printt("Invalid Choice!");
66
67
68
I F:\BES 103\payslip\Menu.exe
Enter Distance (m):10
Enter Time (s):5
69
=");
printf("======
printf("Initial Velocity = Final Velocity-(Acceleration*Time)");
printt("Initial Velocity = %.ef - (%.8f • x.ef)",x,2,y);
70
72
73
===========");
74
75
76
77
78
case 'F
79
Speed = Distance/Time
81
82
83
printf(" ==:
print+("Final Velocity = Initial Velocity+(Acceleration*Time)");
Speed = 10 / 5
Speed = 2.00 m/s
===========");
84
85
86
87
= =====");
88
89
90
91
case
'D'
92
93
Another? (Y/N)
94
95
Process exited after 437.1 seconds with return value 0
Press any key to continue
96
97
98
99
====")
printt("Displacement = (Initial Velocity)(Time)+1/2(Acceleration) (Time^2)")
100
101
102
103
104
105
106
107
case 'T"
108
109
110
111
112
113
printf("======
print+("Time = (Final Velocity-Initial Velocity)/Acceleration");
printf("Time = (%.ef - %.0f) / %.ef",x, i, 2);
=============");
114
115
116
117
=");
118
119
120
121
case 'Q"
122
123
default
124
125
126
127
break;
}
128
129
return e;
130
131
132
Line: 129
Col: 1
Sel: 0
Lines: 135
Length: 4902
Insert
Done parsing in 0.047 seconds
4:10 PM
O Search
DEV
后 )
5/22/2021](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fe7a8d7cc-6354-4a3e-8bc2-1b86b252c4bd%2Fccd4949b-e4ca-453d-b479-a0478adbc433%2Fihqcpf_processed.png&w=3840&q=75)
Transcribed Image Text:* F:\BES 103\payslip\Menu.c - [Executing] - Dev-C++ 5.11
File Edit Search View Project Execute Tools AStyle Window Help
TDM-GCC 4.9.2 64-bit Release
(globals)
Project Classes Debug
[*] Menu.c
printf("Enter Time (s):");
scanf ("Xf",8y);
1=x-(2*y);
gotoxy (4e,6);
gotoxy (4e,7);
gotoxy (4e,s);
gotoxy (4e,1e); printt("Initial Velocity = %.2f m/s",1);
gotoxy (4e,11); printt("========= *
gotoxy (4e,15); print†("Another? (V/N)");
break;
systen ("cls");
printf("Enter Initial Velocity (m/s):");
scanf ("Xf",81);
printt("Enter Acceleration (m/s^2):");
scanf ("Xf",82);
print+("Enter Time (s):");
scanf("Xf",8y);
x=i+(2*y);
gotoxy (4e,6);
gotoxy (4e,7);
gotoxy (4e,5); printf("Final Velocity = %.ef + (3.ef • 1.ef)",1,2,y);
gotoxy (4e, 1e); printt("Final Velocity = %.24 m/s",x);
gotoxy (4e,11); printt("======
gotoxy (4e, 15); printf("Another? (V/N)");
break;
systen ("cls");
printf("Enter Initial Velocity (m/s):");
scant ("Xf",81);
printi("Enter Acceleration (m/s^2):");
scanf ("Xf",82);
print+("Enter Time (s):");
scant ("Xf",&y);
d=i*y+e.5*2*y*y;
gotoxy (3e,6); print+("======
gotoxy (3e,7);
gotoxy (3e,5); print+("Displacement = (x.ef)(%.ef)+1/2(%.ef)(x.ef^2)",i,y, 2,y);
gotoxy (3e, 1e); printf("Displacement = %.2f m",d);
gotoxy (3e,11); printt("====
gotoxy (3e,15); printf("Another? (Y/N)");
break;
systen ("cls");
printt("Enter Final Velocity (m/s):");
scanf ("Xf",8x);
printt("Enter Initial Velocity (m/s):");
scanf ("Xf",81);
print+("Enter Acceleration (m/s^2):");
scanf ("%f",82);
y=(x-1)/2;
gotoxy (34,6);
gotoxy (3e,7);
gotoxy (3e,9);
gotoxy (3e,1e); printt("Tine = %.2f s",y);
gotoxy (3e,11); printf("= ==
gotoxy (3e,15); print+("Another? (Y/N)");
break;
systen ("cls");
exit (e);
systen ("cls");
gotoxy(5e, 2);
printt("Invalid Choice!");
66
67
68
I F:\BES 103\payslip\Menu.exe
Enter Distance (m):10
Enter Time (s):5
69
=");
printf("======
printf("Initial Velocity = Final Velocity-(Acceleration*Time)");
printt("Initial Velocity = %.ef - (%.8f • x.ef)",x,2,y);
70
72
73
===========");
74
75
76
77
78
case 'F
79
Speed = Distance/Time
81
82
83
printf(" ==:
print+("Final Velocity = Initial Velocity+(Acceleration*Time)");
Speed = 10 / 5
Speed = 2.00 m/s
===========");
84
85
86
87
= =====");
88
89
90
91
case
'D'
92
93
Another? (Y/N)
94
95
Process exited after 437.1 seconds with return value 0
Press any key to continue
96
97
98
99
====")
printt("Displacement = (Initial Velocity)(Time)+1/2(Acceleration) (Time^2)")
100
101
102
103
104
105
106
107
case 'T"
108
109
110
111
112
113
printf("======
print+("Time = (Final Velocity-Initial Velocity)/Acceleration");
printf("Time = (%.ef - %.0f) / %.ef",x, i, 2);
=============");
114
115
116
117
=");
118
119
120
121
case 'Q"
122
123
default
124
125
126
127
break;
}
128
129
return e;
130
131
132
Line: 129
Col: 1
Sel: 0
Lines: 135
Length: 4902
Insert
Done parsing in 0.047 seconds
4:10 PM
O Search
DEV
后 )
5/22/2021
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY