Java Program to Find the Potential of a Word
Hello and Welcome to Java Programming Language. In this Video, we will learn to code the Java Program to Find the Potential of a Word. Let’s see How to find the Potential of a Word in Java? The Potential of a word is found by adding the ASCII value of the alphabets. ASCII values of Alphabet A to Z are 65 to 90. Let’s understand by the following example, Word = CODE Potential of the word is 67 + 79 + 68 + 69 = 283. Potential of word BALL will be 66 + 65 + 76 + 76 = 283. ----------------------------------------------------------------------------------------------------------- Problem Statement ----------------------------------------------------------------------------------------------------------- Write a Program to accept a sentence that may be terminated by either “.” , “?” or “!” only. The words of sentences are separated by a single space and are in UPPERCASE. Decode the words according to their Potential and arrange them in ascending order of their potential strength. Test your program with the following data and some random data. Example 1: INPUT: WELCOME TO MRT MENTOR? OUTPUT: WELCOME = 524 TO = 163 MRT = 243 MENTOR = 469 TO MRT MENTOR WELCOME Example 2: INPUT: SUBSCRIBE THIS CHANNEL? OUTPUT: SUBSCRIBE = 674 THIS = 312 CHANNEL = 505 THIS CHANNEL SUBSCRIBE If you have any question, then comment in comment section. Practices : Calculate Electricity Bill Thank You For Watching... Join Telegram Channel Source Code : https://t.me/mrtmentor Java Program to Find the Potential of a Word Based on Potential, Arrange Words using a Java Program What is potential of string in Java How can I print a words from a string in Java How do you enter a word in Java
Download
0 formatsNo download links available.