Question
Introduction to computing
5. Convert the following flowchart of Road sign Decision Process to a C is temp 0 Drive Carefully Wet Road False Message Icy Road Message
0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include <stdio.h>

int main(void) {
   // your code goes here
   char road_status = 'S';
   int temp = 25;
   if( road_status=='S'){ //checks road_status is S or not
   if(temp>0){
   printf("Message: Road is wet");
   }
   else{
   printf("Message: Icy Road");
   }
   }
   else{ // if road_status is not S, prints drive carefully message
   printf("Message: Drive Carefully");
   }
   return 0;
}

Add a comment
Know the answer?
Add Answer to:
Introduction to computing Convert the following flowchart of Road Sign Decision Process to a C code.
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT