#include Elint main() ( int miles, gallons, mpg, END_VAL = 0; while (1) ( printf("How many miles did you drive? Enter 0 to quit: "); scanf("%d", &miles); if (miles 1 END VAL) { printf("How many gallons of gas did you use? "); scanf("%d", &gallons); mpg miles/gallons; printf("your mpg is %d", mpg); printf("\n"); else printf("End of program"); break; return 0;

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Please fix all the errors thank you.

Server Explorer Toolbox
ITD-1033-60614 (8) - lab-def11688-10fc-4eb1-969e-a7ba0ed87dfc.southcentralus.cloudapp.azure.com:7015 - Remote Desktop Connection
Search (Ctrl+Q)
File Edit View Git Project Build Debug Test Analyze Tools Extensions Window Help
► Local Windows Debugger
Week 12 Programming Exercise.c X
Week 12 Programming Exercise
1
Error List
2
3
5
6
7
8
9
DAARNEHAGAANNNNN898
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
48°F
Cloudy
2
|-
Entire Solution
Code
abc E0020
m
9
abc E0018
X C3873
X C2065
! C4047
! C4024
X C2146
X C3872
X C2059
XC4996
C4996
Debug
X 9 Errors
x86
(Global Scope)
Description
identifier ""End" is undefined
! 2 Warnings
expected a ')'
'0x201c': this character is not allowed as a first
character of an identifier
""End": undeclared identifier
'function': 'const char *const' differs in levels of
indirection from 'int'
'printf': different types for formal and actual
parameter 1
_mp9=m1les/gallons;
syntax error: missing ')' before identifier 'of'
'0x201d': this character is not allowed in an
identifier
syntax error: ''
'scanf': This function or variable may be unsafe.
Consider using scanf_s instead. To disable
deprecation, use _CRT_SECURE_NO_WARNINGS.
See online help for details.
'scanf': This function or variable may be unsafe.
Consider using scanf_s instead. To disable
deprecation, use _CRT_SECURE_NO_WARNINGS.
See online help for details.
File
i 0 Messages *
Project
Week 12 Programming Ex... Week 12 Programming Ex... 22
Week 12 Programming Ex... Week 12 Programming Ex... 22
Week 12 Programming Ex... Week 12 Programming Ex... 22
Week 12 Programming Ex... Week 12 Programming Ex... 22
Week 12 Programming Ex... Week 12 Programming Ex... 22
R
Q Search
main()
SCE
Build + IntelliSense
Search Error List
Week 12 Programming Ex... Week 12 Programming Ex... 22
Week 12 Programming Ex... Week 12 Programming Ex... 22
Week 12 Programming Ex... Week 12 Programming Ex... 22
Week 12 Programming Ex... Week 12 Programming Ex... 22
Week 12 Programming Ex... Week 12 Programming Ex... 9
2
Line Suppression State
Week 12 Programming Ex... Week 12 Programming Ex... 13
W
0
€
Week 1...xercise
Solution Explorer
X
Sign in
Live Share
ties
External Dependencies
Header Files
Resource Files
Source Files
Solution Explorer (Ctrl+;)
olution 'Week 12 Programming Exercise' (1 of 1 proj
Week 12 Programming Exercise
■-■ References
Week 12 Programming Exercise.c
n Explorer Git Changes
n
X 64
ADMI
10:21 PM
11/26/2022
Transcribed Image Text:Server Explorer Toolbox ITD-1033-60614 (8) - lab-def11688-10fc-4eb1-969e-a7ba0ed87dfc.southcentralus.cloudapp.azure.com:7015 - Remote Desktop Connection Search (Ctrl+Q) File Edit View Git Project Build Debug Test Analyze Tools Extensions Window Help ► Local Windows Debugger Week 12 Programming Exercise.c X Week 12 Programming Exercise 1 Error List 2 3 5 6 7 8 9 DAARNEHAGAANNNNN898 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 48°F Cloudy 2 |- Entire Solution Code abc E0020 m 9 abc E0018 X C3873 X C2065 ! C4047 ! C4024 X C2146 X C3872 X C2059 XC4996 C4996 Debug X 9 Errors x86 (Global Scope) Description identifier ""End" is undefined ! 2 Warnings expected a ')' '0x201c': this character is not allowed as a first character of an identifier ""End": undeclared identifier 'function': 'const char *const' differs in levels of indirection from 'int' 'printf': different types for formal and actual parameter 1 _mp9=m1les/gallons; syntax error: missing ')' before identifier 'of' '0x201d': this character is not allowed in an identifier syntax error: '' 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. File i 0 Messages * Project Week 12 Programming Ex... Week 12 Programming Ex... 22 Week 12 Programming Ex... Week 12 Programming Ex... 22 Week 12 Programming Ex... Week 12 Programming Ex... 22 Week 12 Programming Ex... Week 12 Programming Ex... 22 Week 12 Programming Ex... Week 12 Programming Ex... 22 R Q Search main() SCE Build + IntelliSense Search Error List Week 12 Programming Ex... Week 12 Programming Ex... 22 Week 12 Programming Ex... Week 12 Programming Ex... 22 Week 12 Programming Ex... Week 12 Programming Ex... 22 Week 12 Programming Ex... Week 12 Programming Ex... 22 Week 12 Programming Ex... Week 12 Programming Ex... 9 2 Line Suppression State Week 12 Programming Ex... Week 12 Programming Ex... 13 W 0 € Week 1...xercise Solution Explorer X Sign in Live Share ties External Dependencies Header Files Resource Files Source Files Solution Explorer (Ctrl+;) olution 'Week 12 Programming Exercise' (1 of 1 proj Week 12 Programming Exercise ■-■ References Week 12 Programming Exercise.c n Explorer Git Changes n X 64 ADMI 10:21 PM 11/26/2022
Server Explorer Toolbox
ITD-1033-60614 (8) - lab-def11688-10fc-4eb1-969e-a7ba0ed87dfc.southcentralus.cloudapp.azure.com:7015 - Remote Desktop Connection
Search (Ctrl+Q)
File Edit View Git Project Build Debug Test Analyze Tools Extensions Window Help
2
► Local Windows Debugger
Week 12 Programming Exercise.c X
Week 12 Programming Exercise
1
#include <stdio.h>
2
3
4
5
6
7
8
9
10
11
CANGASGRINDHENG
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
48°F
Cloudy
Bint main()
{
Debug
int miles, gallons, mpg, END_VAL = 0;
while (1)
{
printf("How many miles did you drive? Enter to quit: ");
scanf("%d", &miles);
if (miles != END_VAL)
{
}
else
(Global Scope)
printf("How many gallons of gas
scanf("%d", &gallons);
mpg = miles / gallons;
printf("your mpg is %d", mpg);
printf("\n");
x86
printf("End of program");
break;
return 0;
you use? ");
Q Search
▼
main()
C
W
2
0
Week 1...xercise
* Solution Explorer
#
Sign in
Search Solution Explorer (Ctrl+;)
+=.
▷
Live Share
External Dependencies
Header Files
Resource Files
Source Files
■
Solution Week 12 Programming Exercise' (1 of 1 proj
Week 12 Programming Exercise
■-■ References
Solution Explorer Git Changes
Properties
Week 12 Programming Exercise.c
n
X 64
ADMI
10:23 PM
11/26/2022
1
Transcribed Image Text:Server Explorer Toolbox ITD-1033-60614 (8) - lab-def11688-10fc-4eb1-969e-a7ba0ed87dfc.southcentralus.cloudapp.azure.com:7015 - Remote Desktop Connection Search (Ctrl+Q) File Edit View Git Project Build Debug Test Analyze Tools Extensions Window Help 2 ► Local Windows Debugger Week 12 Programming Exercise.c X Week 12 Programming Exercise 1 #include <stdio.h> 2 3 4 5 6 7 8 9 10 11 CANGASGRINDHENG 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 48°F Cloudy Bint main() { Debug int miles, gallons, mpg, END_VAL = 0; while (1) { printf("How many miles did you drive? Enter to quit: "); scanf("%d", &miles); if (miles != END_VAL) { } else (Global Scope) printf("How many gallons of gas scanf("%d", &gallons); mpg = miles / gallons; printf("your mpg is %d", mpg); printf("\n"); x86 printf("End of program"); break; return 0; you use? "); Q Search ▼ main() C W 2 0 Week 1...xercise * Solution Explorer # Sign in Search Solution Explorer (Ctrl+;) +=. ▷ Live Share External Dependencies Header Files Resource Files Source Files ■ Solution Week 12 Programming Exercise' (1 of 1 proj Week 12 Programming Exercise ■-■ References Solution Explorer Git Changes Properties Week 12 Programming Exercise.c n X 64 ADMI 10:23 PM 11/26/2022 1
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
User Defined DataType
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education