2. Write a program, h value from the keyboard input, the output of the row with * of h parallelogram, example: input h=4, graphic output are as follows:
* * * *
* * * *
* * * *
* * * *
Is really too stupid don't understand to this piece of hope bosses at odd bit helped give me a little busy thank you very much
CodePudding user response:
Int n=0, d=INT_MIN, x=INT_MIX, j=0, g=0;While (g + + & lt; 20) cin> N, (n> d? D=n: 0), (x> n? X=n: 0) j +=n:
Cout
CodePudding user response:
#includeInt main ()
{
Int a, d;
22,2,3,4,99,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 int I [20]={};
Int xiao=I [0], da=I [0];
For (a=1; a<=19; +)
{
If (xiao> I [a])
Xiao=I [a];
}
For (a=1; a<=19; +)
{
If (daDa=I [a];
}
Printf (" maximum value for: % d, the minimum: % d \ n ", da, xiao);
return 0;
}
CodePudding user response:
Question one: # includeInt main ()
{
Int a, d;
22,2,3,4,99,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 int I [20]={};
Int xiao=I [0], da=I [0];
For (a=1; a<=19; +)
{
If (xiao> I [a])
Xiao=I [a];
}
For (a=1; a<=19; +)
{
If (daDa=I [a];
}
Printf (" maximum value for: % d, the minimum: % d \ n ", da, xiao);
return 0;
}
The second question:
#include
Int main ()
{
Int h=4;
for(int i=0; i<4. I++)
{
For (int j=I; J<4. J++)
{
printf(" ");
}
Printf (" * * * * \ n ");
}
return 0;
}