5. ADD A STATEMENT OR STATEMENTS to the program on the following page (including constant and/or variable declarations if you want) so that the output is the single character 1 followed by a newline. Statements in the execution body of the program must NOT include any literal constants (numeric, Boolean or char); however, you may declare named constants and/or initialize variables in the declaration section of the program. In the program body, you must use at least TWO declared symbolic names (variables or named constants), and you are ABSOLUTELY FORBIDDEN to use anything like the following statement: printf("1\n"); On the other hand, you are encouraged to use a printf statement that outputs the result of a Boolean expression (which output will be either 1 or 0). If you aren't confident of your answer, type in, compile and run the resulting C program to test it.

Respuesta :

Answer:

C code is explained below

Explanation:

#include <stdio.h>

int main() { /* main */

/*

      **********************************************************

      * Declaration Section

      **********************************************************

      *

      * Named Constants

      */

  const int bits_per_byte = 8;

  const int attention_span_in_seconds = 3;

  /*

  * You can insert stuff after this comment.

*/

/*

* Local variables

*/

  int modem_send_speed_in_bits_per_second = 56000;

  int script_file_length_in_bytes = 28000;

  int seconds_to_send_script_file;

  /*

  * You can insert stuff after this comment.

*/

/*

      **********************************************************

      * Execution Section

      **********************************************************

      *

      * You can insert stuff after this comment.

*/

  seconds_to_send_script_file =

      (script_file_length_in_bytes * bits_per_byte) /

      modem_send_speed_in_bits_per_second;

  if (attention_span_in_seconds < seconds_to_send_script_file)

      printf("1\n");

  else printf("0\n");

} /* main */