chap 4 notes 13 - cout<< endl<<"The number of...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
13 # include <iostream> using namespace std; int main( void ) { int failed= 0 , passed= 0 , score; cout << "Enter the score : " ; cin >> score; if (score >= 60 ) { cout << endl << "This is a passing score" ; passed++; } else { cout << endl << "This is a failing score" ; failed++;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } cout << endl << "The number of Passed students is : " << passed; cout << endl << "The number of Failed students is : " << failed << endl; return ; } Since the if block is skipped, its corresponding else block is executed. if…else Example...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online