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.

In c++, How do you make a function to ask the user input, and then store that input? It would ask 3 different chars, and store them?

Computer Science
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
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
use an array for the storage, and a for/while loop to ask the user repeatedly three times to input something into the array. do you need further help?
@Shadowys Can you post an example? The way I have it set up is not working
#include #include int main() { char entry[3], i, k; for(i=0; i<3; ++i){ int c = getchar(); int t = c; if ( c == '\n' ) { i -= 1; continue; }else{ entry[i] = t; } } for(k=0; k<3; ++k){ printf("%c ", entry[k], "\n"); } system("PAUSE"); } Something like this? (This is in C)

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

Something that takes 3 character inputs and saves them?
@hunus yes,

Not the answer you are looking for?

Search for more explanations.

Ask your own question