Search This Blog

Wednesday, November 14, 2018

problem 9

Plants under shade

There are certain plants that needs to be grown under the shade of huge trees and the dead leaves from the trees become the natural manure for the plants. So willow trees are planted throughout the village at certain positions.

The position(distance from the first tree) follows the following series 
0 6 10 17 22 30 36.... 

Input format: 
Input is an integer which corresponds to number of willow trees, n. 

Output format: 
Output is the series that contains 'n' numbers. 

Sample Input 1: 

Sample Output 1: 
0 6 10 17 22 30 36 

Sample Input 2: 

Sample Output 2: 
0 6 10 17 22

No comments:

DBMS Lab

exam link WEEK1 WEEK2 ----> Insertion WEEK3 WEEK4 WEEK5 WEEK6 -----> Solutions WEEK7 PL/SQL WEEK8 WEEK9 WEEK10 WEEK11 WEEK12 DBMS Clas...