Question: . [a] What does this program do? [b] Rewrite the code using appropriate variable names, indentation, and comments. #include main() { int a, b, c,
. [a] What does this program do?
[b] Rewrite the code using appropriate variable names, indentation, and comments.
#include
main()
{
int a, b, c, d;
a = 0;
while (1)
{
printf ("%d ", a);
printf ("Input? ");
scanf ("%d", &c);
if (c == 0) break;
d = 0;
for (b=1; b<=c; b++)
if (c % b == 0) d++;
if(d==2 || c==1) a = a + c;
}
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
