Home > other >  Put a question to bosses
Put a question to bosses

Time:09-29

I wrote a simple loop program, also can run, but I want to ask, how can change i> 10 is output, because now I once I input Numbers is greater than 10 couldn't continue,

CodePudding user response:

 
S=int (input (' s='))
I=int (input (' I=))
While I & lt; 10:
S *=I
I +=1
Print (s)

CodePudding user response:

The if i<=10 the line get rid of? And the output & lt;=10 and & gt; 10 that get rid of it

CodePudding user response:

reference 1/f, ice wind of reply:
 
S=int (input (' s='))
I=int (input (' I=))
While I & lt; 10:
S *=I
I +=1
Print (s)

I want to write is until cycle, but the Internet said to use while Turn, finally comes back to you a break, I now want to can in i Output a number 10,

CodePudding user response:

You're going to be like this?
 
S=int (input (' s='))
I=int (input (' I=))
While True:
If I & lt;=10:
S *=I
I +=1
If I==10:
Break
The else:
Break
Print (s)

CodePudding user response:

ice reference 4 floor of wind response:
do you want it?
 
S=int (input (' s='))
I=int (input (' I=))
While True:
If I & lt;=10:
S *=I
I +=1
If I==10:
Break
The else:
Break
Print (s)

I try to, thank you for your bosses
  • Related