This buggy code wants to create an integer array of size 10, whose values are the integers from 1 to 10. Fix it! Answer: (penalty regime: 10, 20, ... %) Reset answer 1234567α int a[10]; int i; for (i=1; i<10; i++) { a[i] = i; }

Algebra & Trigonometry with Analytic Geometry
13th Edition
ISBN:9781133382119
Author:Swokowski
Publisher:Swokowski
Chapter1: Fundamental Concepts Of Algebra
Section1.1: Real Numbers
Problem 30E
icon
Related questions
Question

Using c++

This buggy code wants to create an integer array of size 10, whose values are the integers from 1 to 10. Fix it!
Answer: (penalty regime: 10, 20, ... %)
Reset answer
1234567α
int a[10];
int i;
for (i=1; i<10; i++) {
a[i] = i;
}
Transcribed Image Text:This buggy code wants to create an integer array of size 10, whose values are the integers from 1 to 10. Fix it! Answer: (penalty regime: 10, 20, ... %) Reset answer 1234567α int a[10]; int i; for (i=1; i<10; i++) { a[i] = i; }
Expert Solution
steps

Step by step

Solved in 1 steps with 1 images

Blurred answer
Recommended textbooks for you
Algebra & Trigonometry with Analytic Geometry
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
College Algebra
College Algebra
Algebra
ISBN:
9781337282291
Author:
Ron Larson
Publisher:
Cengage Learning
Mathematics For Machine Technology
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,
Algebra: Structure And Method, Book 1
Algebra: Structure And Method, Book 1
Algebra
ISBN:
9780395977224
Author:
Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Publisher:
McDougal Littell