0

Is there any way to input multiple (assuming we know the amount) integers in Rust like we do in C++? For example, this is C++ code:

int a, b, c;
cin >> a >> b >> c;

I know I can read them in tuple and then unpack, but I think there must be a way to do it like in C++.

Boiethios
  • 38,438
  • 19
  • 134
  • 183
  • What this C++ code is supposed to do? – Boiethios Feb 07 '20 at 15:26
  • Does this answer your question? [How do I read multiple integers from a single line of stdin?](https://stackoverflow.com/questions/39439582/how-do-i-read-multiple-integers-from-a-single-line-of-stdin) – Hollay-Horváth Zsombor Feb 07 '20 at 15:31
  • @Boiethios, This c++ code demonstrates what my Rust code should do. I am new to Rust, so I don't know how to convert it from c++ to rust. –  Feb 07 '20 at 16:00

0 Answers0