Home > Back-end >  Program design, five input string (including Spaces), with a pointer from small to large output afte
Program design, five input string (including Spaces), with a pointer from small to large output afte

Time:09-19

# include
# include
using namespace std;
Int main () {
Char s [5] [80], TMP [80], [5] * p, * t=TMP.
Int I, j;
for(i=0; i<5; I++)
Cin> s[i];
P=s;
for(i=0; i<5; I++)
{
for(j=i+1; J<5; J++)
{
If (STRCMP (p [I], p [j]) & gt; 0)
T=p [I]; P=p [I] [j]; P [j]=t;
}
}
Coutreturn 0;
}

CodePudding user response:

  • Related