ile Edit Search View Project Execute Tools AStyle Window Help IDM-GCC 4.9.2 €4-bit Release (globals) roject Classes Debug Untitled2.s 3Ac O Project1 1 #include 2 int main() 4日{ 3 int a[1e],s1-e,s2-e,c-e; float avgs 5 7 printf("Enter 5 numbers: \n"); for (int i-e;i<5;i++) 8 10 printf("Number-%d :",1); scanf("%d",&a[i]); s1-s1+a[i]; avg-s1/5; if(a[i]>e){ 11 12 13 14 15 E 16 17 if(a[i]

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...
icon
Related questions
Question
100%

There is an error while running the program.

" Project1 - [Project1.dev] - Dev-C++ 5.11
File Edit Search View Project Execute
O X
Tools AStyle Window Help
南
TDM-GCC 4.9.2 64-bit Release
(globals)
Project Classes Debug
Untitled2.c 3A.c
EU Project1
1
#include <stdio.h>
2
int main()
49 {
3
int a[10],s1=0,s2=0,c=@;
float avgi
6
printf("Enter 5 numbers: \n");
for(int i=0;i<5;i++)
10 E
printf("Number-%d :",i);
scanf("%d",&a[i]);
s1=s1+a[i];
avg=s1/5;
if(a[i]>e){
c=c+1;
11
12
13
14
15 E
16
17
if(a[i]<e)
{
s2=s2+a[i];
18
19 A
20
21
22
printf("Sum of 5 numbers: %d",s1);
printf("\nsum of all negative numbers: %d", s2);
printf("\nNumber of Positive entries: %d",c);
printf("\nAverage of 5 numbers: %f", avg);
return e;
23
27
28
}
88 Compiler (3)
Resources dh Compile Log
Debug 3 Find Results
Close
Line
Col
File
Message
In function 'main':
F:\BES 103\payslip\3A.c
F:\BES 103\payslip\3A.c
F:\BES 103\payslip\3A.c
9
5
[Error] 'for' loop initial declarations are only allowed in C99 or C11 mode
9
[Note] use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
Transcribed Image Text:" Project1 - [Project1.dev] - Dev-C++ 5.11 File Edit Search View Project Execute O X Tools AStyle Window Help 南 TDM-GCC 4.9.2 64-bit Release (globals) Project Classes Debug Untitled2.c 3A.c EU Project1 1 #include <stdio.h> 2 int main() 49 { 3 int a[10],s1=0,s2=0,c=@; float avgi 6 printf("Enter 5 numbers: \n"); for(int i=0;i<5;i++) 10 E printf("Number-%d :",i); scanf("%d",&a[i]); s1=s1+a[i]; avg=s1/5; if(a[i]>e){ c=c+1; 11 12 13 14 15 E 16 17 if(a[i]<e) { s2=s2+a[i]; 18 19 A 20 21 22 printf("Sum of 5 numbers: %d",s1); printf("\nsum of all negative numbers: %d", s2); printf("\nNumber of Positive entries: %d",c); printf("\nAverage of 5 numbers: %f", avg); return e; 23 27 28 } 88 Compiler (3) Resources dh Compile Log Debug 3 Find Results Close Line Col File Message In function 'main': F:\BES 103\payslip\3A.c F:\BES 103\payslip\3A.c F:\BES 103\payslip\3A.c 9 5 [Error] 'for' loop initial declarations are only allowed in C99 or C11 mode 9 [Note] use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
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…
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)
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
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY