Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Reset Write multiple if statements: If carYear is before 1968, print \'Probably

ID: 3746568 • Letter: R

Question

Reset Write multiple if statements: If carYear is before 1968, print 'Probably has few safety features (without quotes) If after 1970, print Probably has seat belts. If after 1991, print Probably has anti-lock brakes. If after 2001, print Probably has airbags. End each phrase with period and newline. Ex carear = 1995 prints: Probably has seat belts. Probably has anti-lock brakes. 1 #include 3 int main(void) ( 4 int carYear; carYear1965; 9, return e; 18

Explanation / Answer

#include int main(void) { int carYear; carYear = 1965; if(carYear < 1968) { printf("Probably has few security features. "); } if(carYear > 1970) { printf("Probably has seat belts. "); } if(carYear > 1991) { printf("Probably has anti-lock brakes. "); } if(carYear > 2001) { printf("Probably has airbags. "); } return 0; }
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote