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


Expert's answer

#include <iostream>
using namespace std;
int main(){
    int ass_marks, test_marksexam_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;
}
LATEST TUTORIALS
APPROVED BY CLIENTS