Minimum number of bombs | C # program to find number of bombings required to kill all aliens . ; function to print where to shoot ; no . of bombs required ; bomb all the even positions ; bomb all the odd positions ; bomb all the even positions again ; Driver code
using System ; class GFG { static void print ( int n ) { Console . WriteLine ( n + n / 2 ) ; for ( int i = 2 ; i <= n ; i += 2 ) Console . Write ( i + " ▁ " ) ; for ( int i = 1 ; i <= n ; i += 2 ) Console . Write ( i + " ▁ " ) ; for ( int i = 2 ; i <= n ; i += 2 ) Console . Write ( i + " ▁ " ) ; } public static void Main ( ) { int n = 3 ; print ( n ) ; } }