Write a shell script to prints all the odd and even numbers between any two given numbers

0
Nisha Verma 15 Rep. Avishek Kumar edited question

Recently, I attend an interview, where I was asked to write a shell script that accepts start and end number and print all the odd and even numbers between the two.

♥ Spread the love ♥
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
0
Avishek Kumar 449 Rep. Avishek Kumar edited answer

Print all the even numbers between any two given numbers

Sample Output

Print all the odd numbers between any two given numbers

Sample Output

Combine the above two into one so that it prints all the odd and even numbers between any two given numbers.

Sample Output

♥ Spread the love ♥
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
×

Login