Learn how our autograder works 1 #include 2 3 int main(void) { 4 int givenYear; 5 6 7 8 if(givenYear>-2101) scanf("%d", &givenYear); 9 10) 11 else if(givenYear>-2001) 12 ( 13 printf("21st century\n"); 14) printf("Distant future\n"); Run 15 else if(givenYear>-1901) 16 ( 17 printf("20th century\n"); Failed to compile main.c:11:1: error: expected identifier or (before 'else' 11 else if (givenYear>=2001) main.c:15:1: error: expected identifier or '(before 'else' 15 else if (givenYear>=1901) main.c:19:1: error: expected identifier or (before 'else' 19 | else main.c:23:1: error: expected identifier or '('before '' token Note: Although the reported line number is in the uneditable part of the code, the error actually exists in your code. Tools often don't recognize the problem until reaching a later line. DIDI 0 All passed Feedback?
Learn how our autograder works 1 #include 2 3 int main(void) { 4 int givenYear; 5 6 7 8 if(givenYear>-2101) scanf("%d", &givenYear); 9 10) 11 else if(givenYear>-2001) 12 ( 13 printf("21st century\n"); 14) printf("Distant future\n"); Run 15 else if(givenYear>-1901) 16 ( 17 printf("20th century\n"); Failed to compile main.c:11:1: error: expected identifier or (before 'else' 11 else if (givenYear>=2001) main.c:15:1: error: expected identifier or '(before 'else' 15 else if (givenYear>=1901) main.c:19:1: error: expected identifier or (before 'else' 19 | else main.c:23:1: error: expected identifier or '('before '' token Note: Although the reported line number is in the uneditable part of the code, the error actually exists in your code. Tools often don't recognize the problem until reaching a later line. DIDI 0 All passed Feedback?
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
Related questions
Question
100%
Could anyone tell me what am I doing wrong with my code ? It's C

Transcribed Image Text:zy Section 3.4 - CIS 161: Introduction X
C In C programming language. | Chegg. +
A
C
□
✰ learn.zybooks.com/zybook/AVCCIS161 McCarySummer2023/chapter/3/section/4?content_resource_id=80162925
zy zyBooks - Build Co... V Vimm's Lair: Preser...
Dashboard
78°F
Windy
=zyBooks My library > CIS 161: Introduction to C Programming home > 3.4: Detecting ranges with branches
Imported From Fire...
Learn how our autograder works
480676.1279990.qx3zqy7
12 {
13 printf("21st century\n");
14}
15 else if(givenYear>=1901)
16 {
17
18}
19 else
20 {
21
22
23 }
24
25
26
27
28}
Run
printf("20th century\n");
printf("Long ago\n");
}
return 0;
Failed to compile
main.c:23:1: error: expected identifier or '('before '' token
23 }
main.c:27:4: error: expected identifier or '('before 'return'
27 |
return 0;
I
main.c:28:1: error: expected identifier or '('before '}' token
28 }
Note: Although the reported line number is in the uneditable part of the code, the error actually exists in your code. Tools often
don't recognize the problem until reaching a later line.
Q Search
O
1 test
passed
All tests
passed
Feedback?
EzyBooks catalog
Help/FAQ
• VPN
Larry Williams
X
|||
2:23 PM
5/31/2023

Transcribed Image Text:zy Section 3.4 - CIS 161: Introduction X
C In C programming language. | Chegg. +
A
C
□
✰ learn.zybooks.com/zybook/AVCCIS161 McCarySummer2023/chapter/3/section/4?content_resource_id=80162925
zy zyBooks - Build Co... V Vimm's Lair: Preser...
Dashboard
78°F
Windy
=zyBooks My library > CIS 161: Introduction to C Programming home > 3.4: Detecting ranges with branches
Imported From Fire...
Learn how our autograder works
480676.1279990.qx3zqy7
1 #include <stdio.h>
2
3 int main(void) {
4
int givenYear;
5
6
7
8 if(givenYear>=2101)
9 printf("Distant future\n");
10 }
11 else if(givenYear>=2001)
12 {
13 printf("21st century\n");
Run
scanf("%d", &givenYear);
14 }
15 else if(givenYear>=1901)
16 {
17 printf("20th century\n");
Failed to compile
main.c:11:1: error: expected identifier or (before 'else'
11 | else if (givenYear>=2001)
main.c:15:1: error: expected identifier or '('before 'else'
15 else if (givenYear>=1901)
main.c:19:1: error: expected identifier or '('before 'else'
19 | else
main.c:23:1: error: expected identifier or '('before '' token
Note: Although the reported line number is in the uneditable part of the code, the error actually exists in your code. Tools often
don't recognize the problem until reaching a later line.
Q Search
O
►
1 test
passed
All tests
passed
Feedback?
EzyBooks catalog
Help/FAQ
• VPN
Larry Williams
X
|||
2:22 PM
5/31/2023
Expert Solution

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 4 steps with 3 images

Knowledge Booster
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
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON

Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education