Answer to Question #213820 in C++ for fawad khan

Question #213820

write a program is c++ using nested if structure to ask a user about students assigment marks, test marks and exam marks. the program will proceed step by step (it will go to read value of the next assigment component only if the previous assemrny id passed and will display a message for each of the assigment components whether it is fulfilled or not. assume the followig statement ass a passing critera cheeg


1
Expert's answer
2021-07-05T04:26:01-0400
#include <iostream>
using namespace std;
int main(){
    int ass_marks, test_marks, exam_marks;
    cout<<"Enter assignment marks: ";
    cin>>ass_marks;
    if(ass_marks > 15){
        cout<<"Assignment: Fulfilled\n";
        cout<<"Enter test marks: ";
        cin>>test_marks;
        if(test_marks > 4){
            cout<<"Test: Fulfilled\n";
            cout<<"Enter exam marks: ";
            cin>>exam_marks;
            if(exam_marks > 40){
                cout<<"Exam: Fulfilled\n";
            }
            else{
                cout<<"Exam: Unfulfilled\n";
            }
        }
        else{
            cout<<"Test: Unfulfilled\n";
            cout<<"Exam: Unfulfilled\n";
    }
    }
    else{
        cout<<"Assignment: Unfulfilled\n";
        cout<<"Test: Unfulfilled\n";
        cout<<"Exam: Unfulfilled\n";
    }
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS