Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

#include <stdio.h> int main(void) { float a, b, c, d, e, f, g, h, i, j; printf(\

ID: 3648439 • Letter: #

Question

#include <stdio.h>
int main(void)
{
float a, b, c, d, e, f, g, h, i, j;

printf("Please enter 10 numbers: ");

scanf("%f %f %f %f %f %f %f %f %f %f", &a, &b, &c, &d, &e, &f, &g, &h, &i, &j);

printf("Your Numbers are: ");
printf(" %3.0f %3.0f ", a, j);
printf(" %3.0f %3.0f ", b, i);
printf(" %3.0f %3.0f ", c, h);
printf(" %3.0f %3.0f ", d, g);
printf(" %3.0f %3.0f ", e, f);

getch();
}

so i typed this in exactly and I keep getting two error messages.

a2.c:23: error: expected identifier before a^;a^ token
a2.c:38: error: expected a^;a^ before a^}a^ token

Explanation / Answer

the error is due to identifier a. declare a in a different line. and see if it helps. which compiler you are using??