Live coding

Attempt the questions below using the Java code editor. Use Copy code to copy your answer, or open OnlineGDB to compile it there (paste your copied code into OnlineGDB). Each question is worth 10 marks. Review your answers before submitting.

Question 1 (10 marks)

write a program to do 4 maths operations.

To test: copy your code, open OnlineGDB, paste it into the editor, then click Run.

Question 2 (10 marks)

WAP using switch case, printing month name, as per mentioned number by user. example user enter 3, it will display march

To test: copy your code, open OnlineGDB, paste it into the editor, then click Run.

Question 3 (10 marks)

WAP to convert int salary into dollar

To test: copy your code, open OnlineGDB, paste it into the editor, then click Run.

Question 4 (10 marks)

WAP to print right angle triangle 1 12 123 1234 12345

To test: copy your code, open OnlineGDB, paste it into the editor, then click Run.

Question 5 (10 marks)

WAP to print 10 fruits name using 1D array and for loop

To test: copy your code, open OnlineGDB, paste it into the editor, then click Run.

Question 6 (10 marks)

WAP to implment linear search on 1D array

To test: copy your code, open OnlineGDB, paste it into the editor, then click Run.

Question 7 (10 marks)

Write question bWAP to implment binary search on 1D arrayy yourself

To test: copy your code, open OnlineGDB, paste it into the editor, then click Run.

Question 8 (10 marks)

WAP to sort in ascending order using Selection Sort

To test: copy your code, open OnlineGDB, paste it into the editor, then click Run.

Question 9 (10 marks)

WAP to sort in decending order using Bubble Sort

To test: copy your code, open OnlineGDB, paste it into the editor, then click Run.

Question 10 (10 marks)

WAP to sort in ascending order using Insertion Sort

To test: copy your code, open OnlineGDB, paste it into the editor, then click Run.