Apex Programming Assigments ------------------------------------------------------------------------------------- First Set (1 to 10 Programs) Program 1 - What is the output for System.debug(-6+4*);? Program 2 - Java Program - What is the output for System.debug((2+3)4); Program 3 - What is the output for System.debug(9+6-3*4/2%5); Program 4 - In-taking two numbers parameters using method and printing their sum Program 5 - Check whether the given input number is even or odd Program 6 - Printing the multiplication table of the given input number Program 7 - Check whether the given year is a Leap Year Program 8 - What is the output for System.debug(7+(3*5)*(4/2)+(5%3)-1); Program 9 - Check whether the given character is a Vowel Program 10 - Print the area of a circle Second Set (11 to 20 Programs) Program 11 - Intake two numbers and finds the quotient and reminder Program 12 - Find the perimeter of the circle Program 13 - Find the power of a number Program 14 - Find the sum of first 100 numbers Program 15 - Intake 6 numbers as input and prints their average Program 16 - Find the sum of all even numbers from 1 to 10 Program 17 - Intake width and height of a Rectangle and there by print its area Program 18 - Swap two numbers Program 19 - Intake width and height of a Rectangle and find its perimeter Program 20 - Find the sum of all the digits in the inputed number Third Set (21 to 30 Programs) Program 21 - Convert a String to integer Program 22 - Convert an integer to String Program 23 - Intakes String and prints the duplicate characters along with ... Program 24 - Print the number of letters, digits, spaces in the statement .. Program 25 - Print the Fibonacci series till the inputted number Program 26 - Reverse a String Program 27 - Check whether the given String text is a Palindrome Program 28 - Check whether the given number is a palindrome Program 29 - Find the Square of the given number Program 30 - Find the Cube of the given number Fourth Set (31 to 40 Programs) Program 31 - Find whether the given number is an Armstrong number Program 32 - Find the factorial of the given number Program 33 - Remove the duplicates from Array with the help of Set Program 34 - Delete duplicates from Sorted Array using index Program 35 - Find the duplicate elements in the array using index Program 36 - Find the duplicate element in the array using Set Program 37 - Count the number of digits in the given number Program 38 - Count the digits in the given number Program 39 - Count the number of even and odd digits in the given number Program 40 - Find the largest of given three numbers Fifth Set (41 to 50 Programs) Program 41 - Find the sum of all the elements in the Array Program 42 - Separately print the even and odd number in the given array Program 43 - Reverse the given number Program 44 - Generate a random number within the given range Program 45 - Compare two arrays Program 46 - Logic to compare two arrays without using inbuilt methods Program 47 - Find the missing element in the array Program 48 - Find the maximum and minimum in the given Array Program 49 - Search for the given element in the array Program 50 - Printing the Array Sixth Set (51 to 60 Programs) Program 51 - Sorting the elements in the Array using build-in functions Program 52 - Remove special characters, spaces and other from the given String.. (Use Regex) Program 53 - Remove white spaces in the given string text Program 54 - Find the number of occurrence of a character in the given String.. Program 55 - Reverse each and every word in the given String text Program 56 - Print the SFDC Org Id & Org Editions of your Org Program 57 - Compare two given numbers Program 58 - Find the ASCII value of the given character Program 59 - Print the text in the specified format Program 60 - Print the current system date and time Seventh Set (61 to 70 Programs) Program 61 - Print the Date and Time in a different format Program 62 - Print the odd numbers from 1 to 10 Program 63 - Intakes a number and prints whether the given number is even or odd Program 64 - Display the numbers from 1 to 25 which are divisible by both 2 & 3 Program 65 - Intakes number of seconds and converts to hours, minutes & seconds Program 66 - Find the factors of the number and the count number of factors Program 67 - Capitalize the first letter of each word in the given statement Program 68 - Convert the given String text to lower case Program 69 - Print the pyramid pattern Program 70 - Print the number triangle pyramid Eight Set (71 to 80 Programs) Program 71 - Print the number pyramid Program 72 - Find the greatest common divisor of given numbers Program 73 - Find the square root of the given number Program 74 - Reverse an Array using Apex Collections Program 75 - Receive input from the User and saving into Array Program 76 - Reverse the elements in the array Program 77 - Reverse the position of words in the String using Collections Program 78 - Find the penultimate word of a sentence Program 79 - Calculates reminder of two numbers without using modulus operator Program 80 - Insert a word in the middle of the given text Ninth Set (81 to 90 Programs) Program 81 - Print the last three letters of the given text Program 82 - Print the first half of the given string text Program 83 - Find the size or length of the given String Program 84 - Find the number of elements in the given array Program 85 - Find the number of elements in the List Program 86 - Right rotate an Array by 1 element Program 87 - Right rotate an Array by 3 elements Program 88 - Left rotate an Array by 1 element Program 89 - Left rotate an Array by 3 elements Program 90 - Swap first and last elements of the Array Tenth Set (91 to 100 Programs) Program 91 - Multiply the corresponding elements in the given two arrays Program 92 - Merge two different sorted arrays into a third sorted array Program 93 - Perform calculator operation Program 94 - Find the IP Address of the given website Program 95 - Check whether the given number is a prime number Program 96 - Print all the prime numbers between 1 and 100 Program 97 - Count number of words in a String Program 98 - Find first occurrence of given element in array without algorithm Program 99 - Swap two numbers without using third variabl Program 100 - Remove the duplicate characters in the given String Eleventh Set (101 to 110 Programs) Program 101 - Left rotate a String by 1 position Program 102 - Left rotate a String by 3 positions Program 103 - Right rotate a String by 1 position Program 104 - Right rotate a String by 3 positions Program 105 - Print right triangle star pattern Program 106 - Print left triangle star pattern 10:34 Program 107 - Print the reversed pyramid star pattern Program 108 - Print diamond shape star pattern Program 109 - Print the downward triangle star pattern Program 110 - Print mirrored right triangle star pattern Twelth Set (111 to 120 Programs) Program 111 - Print the mirrored right down triangle star pattern Program 112 - Print right pascal triangle star pattern Program 113 - Print left pascal triangle star pattern Program 114 - Print Sandglass star pattern Program 115 - Print pyramid border star pattern Program 116 - Find the first non-repeated character in the given String Program 117 - Check whether the given Strings are anagrams using Collections Program 118 - Check whether String is Anagram of another String by using sorting Program 119 - Check whether the given number is a power of 4 Program 120 - Print the Down Triangle having Border Pattern Thirteenth Set (121 to 130 Programs) Program 121 - Print diamond border star pattern Program 122 - Print the number pattern Program 123 - Print Floyd's Triangle Program 124 - Print Pascal Triangle Program 125 - Print Number Pattern 1 22 333 4444 5555 Program 126 - Print Number Pattern 55555 4444 333 22 1 Program 127 - Print Number Pattern 5 54 543 5432 54321 Program 128 - Print Number Pattern 1 21 321 4321 54321 Program 129 - Print Number Pattern 1 10 101 1010 10101 Program 130 - Print Number Pattern 10101 01010 Fourteenth Set (131 to 140 Programs) Program 131 - Print the Sandglass Number Pattern Program 132 - Print Diamond Number Pattern Program 133 - Print the Right Triangle Alphabet Pattern Program 134 - Print Alphabet Pattern A BB CCC DDDD EEEEE Program 135 - Print Triangle Alphabet Pattern Program 136 - Print K Shaped Alphabet Pattern Program 137 - Print Diamond Border Alphabet Pattern Program 138 - Convert a String to Date Program 139 - Check whether the given number is a perfect number Program 140 - Sort an Array in Ascending order using built-in functions Fiftheenth Set (141 to 150 Programs) Program 141 - Sort an Array in descending order using built-in functions Program 142 - Sort an ArrayList in Ascending and Descending order Program 143 - Implementing Binary Search Program 144 - Implement Bubble Sort Algorithm Program 145 - Implement Selection Sort Algorithm Program 146 - Implement Insertion Sort Algorithm Program 147 - Implement Merge Sort Algorithm Program 148 - Implement Quick Sort Algorithm Program 149 - Implementing Heap Sort Algorithm Program 150 - Implementing Linear Search Algorithm