Assignment 1
Assignment 1
MAX.MARKS : 7.5
Group1
2 Develop a program on your own to remove the duplicate elements in an array L6 CO3,
and print CO4
3 Develop a program to initialize an integer array with values and check if a L6 CO3,
given number is present in the array or not. If the number is not found, it will CO4
print -1 else it will print the index value of the given number in the array
Ex1) Array elements are {1,4,34,56,7} and the search element is 90
O/P: -1
Ex2)Array elements are {1,4,34,56,7} and the search element is 56
O/P: 4
4 Design a program on your own to check the given number is prime number or L6 CO1,
not CO2
Group2
2 Develop a program on your own to print the element of an array that has L6 CO3,
occurred the highest number of times CO4
3 Develop a program on your own to find sum of n numbers using enhanced for L6 CO1,
loop CO2
Group3
2 Design a program that displays a menu with options 1. Add 2. Sub L6 CO1,
Based on the options chosen, read 2 numbers and perform the relevant CO2
operation. After performing the operation, the program should ask the user if
he wants to continue. If the user presses y or Y, then the program should
continue displaying the menu else the program should terminate. Note: Use
Scanner class
3 Develop a program on your own to find the largest 2 numbers and the L6 CO3,
smallest 2 numbers in the given array CO4
4 Develop a program on your own to find the factorial of a given number using L6 CO3,
recursion CO4