+ 6
How to enter any data from user in same line in an array
Like i want to enter any number and that must be like 1234667 in same line
7 Antworten
+ 2
Use std::cin
+ 1
use code cin
for example:
#include <iostream>
using namespace std;
int main()
{
int a;
cout << "Please enter a number \n";
cin >> a;
return 0;
}
0
Mohammad Aarif Ansari Try to ask the question in a way that makes sense.
0
cin >> a >> b >>...;
0
Are you asking for a multidimensional array?If yes then If the first row is completely filled then it goes for the next as per iteration .But if you want store more data in a single row it must be large enough .example: Arr[50][10]
0
I think maybe you are asking for insertion in middle which is not possible in an array
- 1
In this code new line will automatically created