This buggy code wants to check if an integer a squares to 1. Fix it! (Do not change the print statements.) Answer: (penalty regime: 10, 20, ... %) Reset answer 1 3. 123456 if (a=-1 | a=1) { } else { } printf("Yes!\n"); printf("No!\n");

Holt Mcdougal Larson Pre-algebra: Student Edition 2012
1st Edition
ISBN:9780547587776
Author:HOLT MCDOUGAL
Publisher:HOLT MCDOUGAL
Chapter4: Factors, Fractions, And Exponents
Section4.6: Negative And Zero Exponents
Problem 51E
icon
Related questions
Question

Using c++

This buggy code wants to check if an integer a squares to 1.
Fix it! (Do not change the print statements.)
Answer: (penalty regime: 10, 20, ... %)
Reset answer
1
3.
123456
if (a=-1 | a=1) {
} else {
}
printf("Yes!\n");
printf("No!\n");
Transcribed Image Text:This buggy code wants to check if an integer a squares to 1. Fix it! (Do not change the print statements.) Answer: (penalty regime: 10, 20, ... %) Reset answer 1 3. 123456 if (a=-1 | a=1) { } else { } printf("Yes!\n"); printf("No!\n");
Expert Solution
steps

Step by step

Solved in 1 steps

Blurred answer
Recommended textbooks for you
Holt Mcdougal Larson Pre-algebra: Student Edition…
Holt Mcdougal Larson Pre-algebra: Student Edition…
Algebra
ISBN:
9780547587776
Author:
HOLT MCDOUGAL
Publisher:
HOLT MCDOUGAL
Algebra & Trigonometry with Analytic Geometry
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
College Algebra (MindTap Course List)
College Algebra (MindTap Course List)
Algebra
ISBN:
9781305652231
Author:
R. David Gustafson, Jeff Hughes
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
Glencoe Algebra 1, Student Edition, 9780079039897…
Glencoe Algebra 1, Student Edition, 9780079039897…
Algebra
ISBN:
9780079039897
Author:
Carter
Publisher:
McGraw Hill
Mathematics For Machine Technology
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,