Identify and explain the kind of error in the following 3 sets of statements a, b and c (Write None if no error exists).
a. //Output the content of variable x;
int X;
X = 10;
cout << x << endl;
b. //Have the user enter in a gpa
char gpaValue;
cin>>gpaValue;
c. //Find the average of 3 numbers
float num1, num2, num3;
cin>>num1>>num2>>num3;
float average = num1 + num2 + num3 / 3;
Answer-
A)-
Error — yes!
B)-
Error — None !
C)-
Error — None !
Note- Please do upvote, if any problem then comment in
box sure I will help.
Get Answers For Free
Most questions answered within 1 hours.