Open study

is now brainly

With Brainly you can:

  • Get homework help from millions of students and moderators
  • Learn how to solve problems with step-by-step explanations
  • Share your knowledge and earn points by helping other students
  • Learn anywhere, anytime with the Brainly app!

A community for students.

See more answers at brainly.com
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Join Brainly to access

this expert answer

SIGN UP FOR FREE
i have this code ``` #include #include main() { int a[100]; int b, c, d; printf("How many numbers do you want? "); scanf("%d", &c); for (b=1; b<=c; b++) { printf("\nEnter number %d: ", b); scanf("%d", d); } getch(); } ``` how can i make the program print the inputted numbers in a form of a list?
#include #include main() { int a[100]; int b, c, d[c]; printf("How many numbers do you want? "); scanf("%d", &c); for (b=1; b<=c; b++) { printf("\nEnter number %d: ", b); scanf("%d", d[b]); } getch(); } may be this can be helpful
#include #include main() { int a[100]; int b, c; printf("How many numbers do you want? "); scanf("%d", &c); for (b=1; b<=c; b++) { printf("\nEnter number"); scanf("%d", &a[c]); } getch(); }

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

The &a[c] lets you give an input of c numbers If you want to display it again then you can add up the following code for (b=1; b<=c; b++) { printf("\nThe numbers are\n"); printf("%d", a[c]); }
it will give you array out of bound error ? dont you noticed?
In C an array always starts at index 0, not 1. You can ask the user for the first number but the first position in the array is zero. And the highest index is the size of the array minus 1. 99 in this case. So you should use < instead of <= and starting at 0. Otherwise you could get an index out of range error when accessing index 100. #include #include main() { int a[100]; int b = 0; int c = 0; // c mustn't be higher than 100 // if c is greater 100, ask the user again do { printf("How many numbers do you want (max. 100)? "); scanf("%d", &c); } while(c > 100); // input for (b=0; b

Not the answer you are looking for?

Search for more explanations.

Ask your own question