https://github.com/shojiyao12/flames_calculator-and-prime_word_detector
This is a beginner-level program for a Flames Calculator and Prime Word Detector using C as the base for its development.
https://github.com/shojiyao12/flames_calculator-and-prime_word_detector
algorithm-challenges c-programming flames-calculator number-manipulation prime-word-detector user-choice-condition word-manipulation
Last synced: 3 months ago
JSON representation
This is a beginner-level program for a Flames Calculator and Prime Word Detector using C as the base for its development.
- Host: GitHub
- URL: https://github.com/shojiyao12/flames_calculator-and-prime_word_detector
- Owner: Shojiyao12
- Created: 2024-05-08T11:53:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-08T12:29:48.000Z (over 1 year ago)
- Last Synced: 2025-07-02T22:36:45.014Z (3 months ago)
- Topics: algorithm-challenges, c-programming, flames-calculator, number-manipulation, prime-word-detector, user-choice-condition, word-manipulation
- Language: C
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Project Description
- The program will display a menu to let the user choose whether to show the Flames Calculator (A) or Prime Word Detector (B). After displaying the required output, the program will display the menu again until the user chooses the exit option (C).
- Overview of Option A:
- The FLAMES Calculator accepts two names of not more than 30 characters per name. These two names can have other non-alphabetical characters like $ @ & % but no spaces allowed in a name. However, only the alphabets from a to z or A to Z will be used in the calculation. Each alphabet has a particular value. The values are from 1 to 26 in ascending order of the alphabets. It is like this, a = 1, b = 2, c = 3........ z = 26. Both upper case and lower-case letters hold the same values. Then make the sum of these numbers until it comes in one digit. For example, consider the name 'bcz'. Here, b = 2, c = 3 & z = 26. So, the sum is (2+3+26) = 31 = (3+1) = 4.] Then the ratio of these two numbers in percentage will be the result of the calculation. Remember that the result cannot be more than 100% so take the ratio carefully to avoid this problem. The love percentage must be displayed with two decimals.
- Overview of Option B:
- Given a string containing only alpha-numerals (0-9, A-Z and a-z), count the number of times the character is present for all characters in the word (frequency count) and show only those characters whose frequency is a prime number. A prime number is a number that is divisible by exactly two different integers. Some examples of prime numbers are 2, 3, 5, 7, 11, etc. The length of the word is positive and less than 2001 characters. The characters are to be sorted in lexicographic order (ascending order). Lexicographic order means ascending order in terms of the ASCII values. Suppose none of the character’s frequency is a prime number, print “Empty”. The prime numbers of these characters are added until a number with a single digit is produced, representing the word's value. For example, EEEAAABBCCCCDD has ABDE as prime characters (3 A’s, 2 B’s, 2 D’s and 3 E’s) and the value of the word EEEAAABBCCCCDD is 1 because [3+2+2+3 = 10] and then [1 + 0 = 1].## Quickstart Guide
1. Copy all the contents from this repository.
2. Open the MP3A.C file using an IDE, like VSCode
3. Run the MP3A.C file
- The menu should display the user with three choices:
- A. Flames Calculator
- B. Prime Word Detector
- C. Exit## Core Concept
- Fundamentals of Programming I## Test Cases
## Preview of the Program for Word Manipulation

