he/she failed. Note: Passing grade is include 2 3 using namespace std 4 int main () { 5 6 int mat_grade=0; int eng_grade=0;
he/she failed. Note: Passing grade is include 2 3 using namespace std 4 int main () { 5 6 int mat_grade=0; int eng_grade=0;
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 10PE
Related questions
Question
Write the issue of code in explanation.
In points.
And debug.
![1 //This program will ask for the user's grades in Math, English, and
Science. It will then display his/her average and the remarks if
he/she failed. Note: Passing grade is 75.
include<iostream>
2
3 using namespace std
4
int main () {
5
6
7
8
9
10
11
12
13
14
15
16
17-
18
19
20
21
22
23- {
24
25
int mat_grade=0;
int eng_grade=0;
int sci_grade-0;
int ave_grade=0;
cout>> "Enter your grade in Math: ";
cin<<mat_grade;
cout<<"Enter your grade in English: ;
cin>>eng_grade;
cout<<"Enter your grade in Science: ";
cin>>sci_grade;
ave_grade (mat_grade+eng_grade+sci_grade)/4;
cout<<"Your average grade is "<<average<<endl;
if(ave_grade>=75) {
cout<<"You passed!"
}
else;
}
cout<<"You failed.";](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F5b18cbff-fbf2-46db-9f9d-e4b28ef44c93%2F475a3786-744d-495d-99cb-bd1f2b35f1f0%2Fanh1rek_processed.jpeg&w=3840&q=75)
Transcribed Image Text:1 //This program will ask for the user's grades in Math, English, and
Science. It will then display his/her average and the remarks if
he/she failed. Note: Passing grade is 75.
include<iostream>
2
3 using namespace std
4
int main () {
5
6
7
8
9
10
11
12
13
14
15
16
17-
18
19
20
21
22
23- {
24
25
int mat_grade=0;
int eng_grade=0;
int sci_grade-0;
int ave_grade=0;
cout>> "Enter your grade in Math: ";
cin<<mat_grade;
cout<<"Enter your grade in English: ;
cin>>eng_grade;
cout<<"Enter your grade in Science: ";
cin>>sci_grade;
ave_grade (mat_grade+eng_grade+sci_grade)/4;
cout<<"Your average grade is "<<average<<endl;
if(ave_grade>=75) {
cout<<"You passed!"
}
else;
}
cout<<"You failed.";
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
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 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
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
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781305480537/9781305480537_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage