I am currently reading the book " Programming Principles and Practice Using " and trying to solve a really simple exercise:
" Write a program that consists of a while -loop that (each time around the
loop) reads in two int s and then prints them. Exit the program when a
terminating '|' is entered."
I do not know how to formulate the condition to break the while loop
#include "std_lib_facilities.h"
int main()
{ int i = 0,j = 0;
while()
{
cin>>i>>j;
cout<<i<<j<<endl;
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…