2018年7月19日 星期四

Car driving - Beginning C++ Programming - From Beginner to Beyond

https://ideone.com/OqaY2V

#include <iostream>
using namespace std;

void logical_operators(int age, bool parental_consent, bool ssn, bool accidents) {
 
    //----WRITE YOUR CODE BELOW THIS LINE----
 
    if (((age > 15) && parental_consent && ssn && (!accidents))||
    ((age >= 18) && (1 || parental_consent) && ssn && (!accidents)))//WRITE ALL YOUR CODE WITHIN THE PARENTHESES
        cout << "Yes, you can work.";
 
    //----WRITE YOUR CODE ABOVE THIS LINE----
    return;
}
int main(){

return 0;
}
//this is a solution for "Beginning C++ Programming - From Beginner to Beyond" in ch3,"Statement and Operator"

沒有留言:

張貼留言