0
How to read input separated comma and space in Java and C programs
input formate 1,2,3,4 and 1 2 3 4
2 ответов
0
Hema Medicharla below is the way to achieve both input format:
//for c
char s[100];
scanf("%[^\n]s",s);
//for c++
string s;
getline(cin,s);
Note that you need to use #include<string> to use string command in c++
I am not aware about Java
0
Thank you