Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 1 (10 points) -True/False Submit a document called: Answers.doc Answer the following true/false questions. You must correctly state WHY your answer is true or
Problem 1 (10 points) -True/False Submit a document called: Answers.doc Answer the following true/false questions. You must correctly state WHY your answer is true or false in order to receive credit. #include #include int main (int argc, char **argy) { int travel_points=1; int check=0; char answer[20]; while(!check) { printf("Enter state, national or international: "); scanf("%s", answer); if(!strcmp(answer, "state")) { travel_points=travel_points+5; printf("Adding 5 points. New total: %d ", travel_points); } else if (!strcmp(answer, "national")) { travel_points=(travel_points+5)*2; printf("Getting state points plus double points! New total: %d ", travel_points); } else if(!strcmp(answer, "international")) { travel_points*=4; printf("Getting 4x more points! New total: %d ", travel_points); } else if((strcmp(answer, "exit")==0)) { if(travel_points
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started