let me to read a line only.Let me know the method of reading i/p format like below in C++ where I have to read both first and second line inside of a while loop.
Code: Select all
adjkajdkajdkajsdkja
kdakd;akdka;kd;akd;
Moderator: Board moderators
Code: Select all
adjkajdkajdkajsdkja
kdakd;akdka;kd;akd;
Code: Select all
char a[20],b[20];
scanf("%s\n%s",&a,&b);
Code: Select all
string s[2];
int n;
while(n)
{
//read consecutive two lines in s
}