└── icrecream.txt /icrecream.txt: -------------------------------------------------------------------------------- 1 | A icecream shop contains two varities namely vanilla and chocolate they arranged icecreams in even and odd positions .vanillas at odd position and chocolate at evenposition. 2 | if user select one number that icecream will be given to the customers..lets see in java 3 | 4 | import java.util.*; 5 | public class icecream{ 6 | public static void main(String args[]) 7 | { 8 | Scanner sc=new Scanner(System.in); 9 | int n=sc.nextInt(); 10 | if(n%2==0) 11 | System.out.println("chocolate icecream"); 12 | else 13 | System.out.println("vanilla icecream"); 14 | } 15 | } --------------------------------------------------------------------------------