Home > Back-end >  Read a newline
Read a newline

Time:05-24

C + + chicken dish one, don't understand how to read a newline, failed in the second picture, the third to add the circular passed, there is no other way to ask bosses could read a newline,

CodePudding user response:

Reference:
 # include 
#include
using namespace std;

Int main ()
{
Int low=0, upp=0;
Char STR [10002].
Cin. Getline (STR., 10002, '#');//end with a '#' sign
for(int i=0; STR [I]; I++) {
If (STR [I] & gt;='a' & amp; & STR [I] The else
If (STR [I] & gt;='A' & amp; & STR [I] }
cout<" The lower: "& lt;
return 0;
}

//What?
//the Draw me a sheep... #
//the lower: 14, upper: 2
//please press any key to continue..

CodePudding user response:

 
If (STR [I]=='? ')
break;
  • Related