T
F
F
F
T
T
T
T
T
T
T
F
T
F
F
#include <stdio.h> int main () { double d; printf ("Enter degrees: "); scanf ("%lf", &d); printf ("%f radians\n", 3.14159 * (d / 180)); return 0; }
#include <stdio.h> int main () { int i; for (i=1; i<=99; i+=2) printf ("%d\n", i); return 0; }
#include <stdio.h> #include <stdlib.h> int main () { double sum, avg, num int n; n = 0; printf ("Enter some numbers, -1 when done.\n"); scanf ("%f", &num); while (num != -1) { sum += num; n++; scanf ("%lf", &num); avg = sum / n; printf ("The average is %f\n", avg); exit 0; }
Some errors: 1. Semicolon is missing from the end of the first 'double' declaration. 2. First scanf should use the "%lf" format to read a double. 3. The while statement has an open brace without a close brace. 4. The value of 'n' could be zero causing a division by zero error. 5. The exit function should have parentheses around its argument.