Input : Any natural number V1 Logic : I used for loop and summ variable V2 Logic : I used formula for sum of n natural numbers Output : Sum of natural numbers
Input: The number of lines to print stars. Output: Star pattern. V2 - Logic: We used 2 for loops. V1 - Logic: We used simple fix approach of print to print 5 lines of *.
Input : As many birthday guests as you want Output : Guest number and guest name Logic : I used loop to not write same line again and again. I used if and else condition to identify host eelis and guests. I used count to keep track of the number guests.