HARIKRUSHN

Challange-1

Dec 12th, 2019
419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. A for loop is a programming language statement which allows code to be repeatedly executed.
  2.  
  3. The syntax for this is
  4.  
  5. for ( <expression_1> ; <expression_2> ; <expression_3> )
  6. <statement>
  7. expression_1 is used for intializing variables which are generally used for controlling terminating flag for the loop.
  8. expression_2 is used to check for the terminating condition. If this evaluates to false, then the loop is terminated.
  9. expression_3 is generally used to update the flags/variables.
  10. A sample loop will be
  11.  
  12. for(int i = 0; i < 10; i++) {
  13. ...
  14. }
  15.  
  16. Input Format :
  17. -> You will be given two positive integers, and (), separated by a newline.
  18.  
  19. Output Format :
  20. -> For each integer in the interval :
  21.  
  22. If , then print the English representation of it in lowercase. That is "one" for , "two" for , and so on.
  23. Else if and it is an even number, then print "even".
  24. Else if and it is an odd number, then print "odd".
  25.  
  26. Note:
  27.  
  28. Sample Input :
  29. 8
  30. 11
  31. Sample Output :
  32. eight
  33. nine
  34. even
  35. odd
Add Comment
Please, Sign In to add comment